From 52c371905ff4dbcc18c9b160f5685ef1e6ad5884 Mon Sep 17 00:00:00 2001 From: crueter Date: Thu, 10 Jul 2025 13:26:57 -0400 Subject: [PATCH] [android] fix dyna_state cast and improve english grammar Signed-off-by: crueter --- .../features/settings/model/view/SingleChoiceSetting.kt | 9 ++++++++- src/android/app/src/main/res/values/strings.xml | 6 +++--- src/common/settings.h | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SingleChoiceSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SingleChoiceSetting.kt index 624bc2445c..aea72946f7 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SingleChoiceSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SingleChoiceSetting.kt @@ -5,6 +5,7 @@ package org.yuzu.yuzu_emu.features.settings.model.view import androidx.annotation.ArrayRes import androidx.annotation.StringRes +import org.yuzu.yuzu_emu.features.settings.model.AbstractByteSetting import org.yuzu.yuzu_emu.features.settings.model.AbstractIntSetting import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting @@ -24,8 +25,14 @@ class SingleChoiceSetting( fun getSelectedValue(needsGlobal: Boolean = false) = when (setting) { is AbstractIntSetting -> setting.getInt(needsGlobal) + is AbstractByteSetting -> setting.getByte(needsGlobal).toInt() else -> -1 } - fun setSelectedValue(value: Int) = (setting as AbstractIntSetting).setInt(value) + fun setSelectedValue(value: Int) = + when (setting) { + is AbstractIntSetting -> setting.setInt(value) + is AbstractByteSetting -> setting.setByte(value.toByte()) + else -> -1 + } } diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index ac9141863c..602be31027 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -74,7 +74,7 @@ GPU Extensions Extended Dynamic State - Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Legacy emulated formats. + Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Disable to emulate scaled formats. Disabled Provoking Vertex Improves lighting and vertex handling in certain games. Only supported on Vulkan 1.0+ GPUs. @@ -95,11 +95,11 @@ Uninstalling firmware Firmware uninstalled successfully - Miscellaneous + CPU and Memory Synchronize Core Speed Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the game\'s actual speed. Enable LRU Cache - Enable or disable the Least Recently Used (LRU) cache, increasing performance by saving CPU process usage. Some games have issue with it, notably TotK 1.2.1, so disable if the game doesn\'t boot or crashes randomly. + Enable or disable the Least Recently Used (LRU) cache, increasing performance by saving CPU process usage. Some games have issues with it, notably TotK 1.2.1, so disable if the game doesn\'t boot or crashes randomly. Fast CPU Time Forces the emulated CPU to run at a higher clock, reducing certain FPS limiters. This option is hacky and may cause issues, and weaker CPUs may see reduced performance. Custom CPU Ticks diff --git a/src/common/settings.h b/src/common/settings.h index 0cadd22459..cf89d2ca5c 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -331,7 +331,7 @@ struct Values { SwitchableSetting use_disk_shader_cache{linkage, true, "use_disk_shader_cache", Category::Renderer}; SwitchableSetting optimize_spirv_output{linkage, - SpirvOptimizeMode::OnLoad, + SpirvOptimizeMode::Never, SpirvOptimizeMode::Never, SpirvOptimizeMode::Always, "optimize_spirv_output",