From 5de8c5b5c74bc38a3f8ddbcfbf34aebb617e9f64 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Sun, 4 Jun 2023 02:42:58 -0400 Subject: [PATCH 1/2] android: Several string changes --- .../keyboard/ui/KeyboardDialogFragment.kt | 2 +- .../settings/ui/SettingsFragmentPresenter.kt | 2 +- .../yuzu_emu/fragments/EmulationFragment.kt | 1 + .../app/src/main/res/values/arrays.xml | 52 +++++----- .../app/src/main/res/values/strings.xml | 99 +++++++++---------- 5 files changed, 78 insertions(+), 78 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/ui/KeyboardDialogFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/ui/KeyboardDialogFragment.kt index 4b12809bc..607a3d506 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/ui/KeyboardDialogFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/ui/KeyboardDialogFragment.kt @@ -63,7 +63,7 @@ class KeyboardDialogFragment : DialogFragment() { val headerText = config.header_text!!.ifEmpty { resources.getString(R.string.software_keyboard) } val okText = - config.ok_text!!.ifEmpty { resources.getString(android.R.string.ok) } + config.ok_text!!.ifEmpty { resources.getString(R.string.submit) } return MaterialAlertDialogBuilder(requireContext()) .setTitle(headerText) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index 7d55c5b2f..1f89a5c70 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -78,7 +78,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) } private fun addConfigSettings(sl: ArrayList) { - settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_advanced_settings)) + settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.advanced_settings)) sl.apply { add( SubmenuSetting( 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 1a9843fcc..41b1a6e23 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 @@ -314,6 +314,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { .setPositiveButton(android.R.string.ok) { _, _ -> refreshInputOverlay() } + .setNegativeButton(android.R.string.cancel, null) .setNeutralButton(R.string.emulation_toggle_all) { _, _ -> } .show() diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml index fa88770c8..ea20cb17c 100644 --- a/src/android/app/src/main/res/values/arrays.xml +++ b/src/android/app/src/main/res/values/arrays.xml @@ -2,67 +2,67 @@ - @string/region_auto - @string/region_japan - @string/region_usa - @string/region_europe + @string/auto @string/region_australia @string/region_china + @string/region_europe + @string/region_japan @string/region_korea @string/region_taiwan + @string/region_usa -1 - 0 - 1 - 2 3 4 + 2 + 0 5 6 + 1 - @string/language_japanese + @string/language_brazilian_portuguese + @string/language_british_english + @string/language_canadian_french + @string/language_chinese + @string/language_dutch @string/language_english @string/language_french @string/langauge_german @string/language_italian - @string/language_spanish - @string/language_chinese + @string/language_japanese @string/language_korean - @string/language_dutch + @string/language_latin_american_spanish @string/language_portuguese @string/language_russian - @string/language_taiwanese - @string/language_british_english - @string/language_canadian_french - @string/language_latin_american_spanish @string/language_simplified_chinese + @string/language_spanish + @string/language_taiwanese @string/language_traditional_chinese - @string/language_brazilian_portuguese - 0 + 17 + 12 + 13 + 6 + 8 1 2 3 4 - 5 - 6 + 0 7 - 8 + 14 9 10 - 11 - 12 - 13 - 14 15 + 5 + 11 16 - 17 @@ -166,7 +166,7 @@ - @string/cpu_accuracy_auto + @string/auto @string/cpu_accuracy_accurate @string/cpu_accuracy_unsafe @string/cpu_accuracy_paranoid diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index fc24e27f5..3239953f9 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -41,7 +41,7 @@ Skip selecting games folder? Games won\'t be displayed in the Games list if a folder isn\'t selected. https://yuzu-emu.org/help/quickstart/#dumping-games - Search Games + Search games Games directory selected Install prod.keys Required to decrypt retail games @@ -77,8 +77,8 @@ Install alternative drivers for potentially better performance or accuracy Advanced settings Configure emulator settings - Recently Played - Recently Added + Recently played + Recently added Retail Homebrew Open yuzu folder @@ -124,39 +124,39 @@ Are you interested? - Enable limit speed - When enabled, emulation speed will be limited to a specified percentage of normal speed. + Limit speed + Limits emulation speed to a specified percentage of normal speed. Limit speed percent - Specifies the percentage to limit emulation speed. With the default of 100% emulation will be limited to normal speed. Values higher or lower will increase or decrease the speed limit. + Specifies the percentage to limit emulation speed. 100% is the normal speed. Values higher or lower will increase or decrease the speed limit. CPU accuracy - Docked mode - Emulates in docked mode, which increases the resolution at the expense of performance. + Docked Mode + Increases resolution, decreasing performance. Handheld Mode is used when disabled, lowering resolution and increasing performance. Emulated region Emulated language - Select RTC Date - Select RTC Time - Enable Custom RTC - This setting allows you to set a custom real time clock separate from your current system time - Set Custom RTC + Select RTC date + Select RTC time + Custom RTC + Allows you to set a custom real-time clock separate from your current system time. + Set custom RTC API Accuracy level - Resolution + Resolution (Handheld/Docked) VSync mode - Aspect Ratio - Window Adapting Filter - Anti-Aliasing Method + Aspect ratio + Window adapting filter + Anti-aliasing method Force maximum clocks (Adreno only) Forces the GPU to run at the maximum possible clocks (thermal constraints will still be applied). Use asynchronous shaders - Compiles shaders asynchronously, which will reduce stutter but may introduce glitches. - Enable graphics debugging - When checked, the graphics API enters a slower debugging mode. - Use disk shader cache - Reduce stuttering by storing and loading generated shaders to disk. + Compiles shaders asynchronously, reducing stutter but may introduce glitches. + Graphics debugging + Sets the graphics API to a slow debugging mode. + Disk shader cache + Reduces stuttering by locally storing and loading generated shaders. Volume @@ -171,10 +171,12 @@ Do you want to reset this setting back to its default value? Reset to default Reset all settings? - All Advanced Settings will be reset to their default configuration. This can not be undone. + All advanced settings will be reset to their default configuration. This can not be undone. Settings reset Close - Learn More + Learn more + Auto + Submit Select GPU driver @@ -188,7 +190,6 @@ Installing driver… - Advanced Settings Settings General System @@ -206,29 +207,29 @@ ROM file does not exist - Exit Emulation + Exit emulation Done - FPS Counter - Toggle Controls - Relative Stick Center - DPad Slide - Haptics - Show Overlay - Toggle All - Adjust Overlay + FPS counter + Toggle controls + Relative stick center + D-pad slide + Touch haptics + Show overlay + Toggle all + Adjust overlay Scale Opacity - Reset Overlay - Edit Overlay - Pause Emulation - Unpause Emulation - Overlay Options + Reset overlay + Edit overlay + Pause emulation + Unpause emulation + Overlay options Game loading… - Loading Settings… + Loading settings… - Software Keyboard + Software keyboard Abort @@ -242,7 +243,6 @@ Turning off this setting will significantly reduce emulation performance! For the best experience, it is recommended that you leave this setting enabled. - Auto-select Japan USA Europe @@ -312,18 +312,17 @@ Force 4:3 Force 21:9 Force 16:10 - Stretch to Window + Stretch to window - Auto Accurate Unsafe Paranoid (Slow) - D-Pad - Left Stick - Right Stick + D-pad + Left stick + Right stick Home Screenshot @@ -332,18 +331,18 @@ Building shaders - Change App Theme + Change app theme Default Material You - Change Theme Mode + Change theme mode Follow System Light Dark - Use Black Backgrounds + Black backgrounds When using the dark theme, apply black backgrounds. From 5e58af0616a905682b8eb689ed792f420095ff53 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Sun, 4 Jun 2023 02:57:57 -0400 Subject: [PATCH 2/2] android: Move settings to debug submenu --- .../features/settings/model/Settings.kt | 1 + .../settings/model/view/SubmenuSetting.kt | 3 +- .../settings/ui/SettingsFragmentPresenter.kt | 59 +++++++++++-------- .../app/src/main/res/values/strings.xml | 1 + 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt index 23c31e13a..df8dd8634 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt @@ -108,6 +108,7 @@ class Settings { const val SECTION_AUDIO = "Audio" const val SECTION_CPU = "Cpu" const val SECTION_THEME = "Theme" + const val SECTION_DEBUG = "Debug" const val PREF_OVERLAY_INIT = "OverlayInit" const val PREF_CONTROL_SCALE = "controlScale" diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SubmenuSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SubmenuSetting.kt index 8c1af6396..a3ef59c2f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SubmenuSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SubmenuSetting.kt @@ -6,10 +6,9 @@ package org.yuzu.yuzu_emu.features.settings.model.view import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting class SubmenuSetting( - setting: AbstractSetting?, titleId: Int, descriptionId: Int, val menuKey: String -) : SettingsItem(setting, titleId, descriptionId) { +) : SettingsItem(null, titleId, descriptionId) { override val type = TYPE_SUBMENU } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index 1f89a5c70..061046b2e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -68,6 +68,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) Settings.SECTION_RENDERER -> addGraphicsSettings(sl) Settings.SECTION_AUDIO -> addAudioSettings(sl) Settings.SECTION_THEME -> addThemeSettings(sl) + Settings.SECTION_DEBUG -> addDebugSettings(sl) else -> { fragmentView.showToastMessage("Unimplemented menu", false) return @@ -82,7 +83,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) sl.apply { add( SubmenuSetting( - null, R.string.preferences_general, 0, Settings.SECTION_GENERAL @@ -90,7 +90,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) ) add( SubmenuSetting( - null, R.string.preferences_system, 0, Settings.SECTION_SYSTEM @@ -98,7 +97,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) ) add( SubmenuSetting( - null, R.string.preferences_graphics, 0, Settings.SECTION_RENDERER @@ -106,12 +104,18 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) ) add( SubmenuSetting( - null, R.string.preferences_audio, 0, Settings.SECTION_AUDIO ) ) + add( + SubmenuSetting( + R.string.preferences_debug, + 0, + Settings.SECTION_DEBUG + ) + ) add( RunnableSetting( R.string.reset_to_default, @@ -223,17 +227,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) private fun addGraphicsSettings(sl: ArrayList) { settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_graphics)) sl.apply { - add( - SingleChoiceSetting( - IntSetting.RENDERER_BACKEND, - R.string.renderer_api, - 0, - R.array.rendererApiNames, - R.array.rendererApiValues, - IntSetting.RENDERER_BACKEND.key, - IntSetting.RENDERER_BACKEND.defaultValue - ) - ) + add( SingleChoiceSetting( IntSetting.RENDERER_ACCURACY, @@ -327,15 +321,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) IntSetting.RENDERER_ASYNCHRONOUS_SHADERS.defaultValue ) ) - add( - SwitchSetting( - IntSetting.RENDERER_DEBUG, - R.string.renderer_debug, - R.string.renderer_debug_description, - IntSetting.RENDERER_DEBUG.key, - IntSetting.RENDERER_DEBUG.defaultValue - ) - ) } } @@ -451,4 +436,30 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) ) } } + + private fun addDebugSettings(sl: ArrayList) { + settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_debug)) + sl.apply { + add( + SingleChoiceSetting( + IntSetting.RENDERER_BACKEND, + R.string.renderer_api, + 0, + R.array.rendererApiNames, + R.array.rendererApiValues, + IntSetting.RENDERER_BACKEND.key, + IntSetting.RENDERER_BACKEND.defaultValue + ) + ) + add( + SwitchSetting( + IntSetting.RENDERER_DEBUG, + R.string.renderer_debug, + R.string.renderer_debug_description, + IntSetting.RENDERER_DEBUG.key, + IntSetting.RENDERER_DEBUG.defaultValue + ) + ) + } + } } diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 3239953f9..f9b759532 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -196,6 +196,7 @@ Graphics Audio Theme and color + Debug Your ROM is encrypted