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/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
index 05c14e278d..6cce31a4eb 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
@@ -643,13 +643,19 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
val battery: BatteryManager =
requireContext().getSystemService(Context.BATTERY_SERVICE) as BatteryManager
+ val batteryIntent = requireContext().registerReceiver(null,
+ IntentFilter(Intent.ACTION_BATTERY_CHANGED))
val capacity = battery.getIntProperty(BATTERY_PROPERTY_CAPACITY)
val nowUAmps = battery.getIntProperty(BATTERY_PROPERTY_CURRENT_NOW)
sb.append(String.format("%.1fA (%d%%)", nowUAmps / 1000000.0, capacity))
- if (battery.isCharging || nowUAmps > 0.0) {
+ val status = batteryIntent?.getIntExtra(BatteryManager.EXTRA_STATUS, -1)
+ val isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL
+
+ if (isCharging) {
sb.append(" ${getString(R.string.charging)}")
}
}
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..551e66c57e 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",
@@ -477,7 +477,7 @@ struct Values {
SwitchableSetting use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
Category::RendererAdvanced};
SwitchableSetting use_fast_gpu_time{linkage,
- false,
+ true,
"use_fast_gpu_time",
Category::RendererAdvanced,
Specialization::Paired,