diff options
author | bunnei <bunneidev@gmail.com> | 2023-06-05 04:17:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 04:17:42 +0200 |
commit | 2f7658bd75f0a4043567752b3ea0b9a66917a0f1 (patch) | |
tree | bb4d0fc812026394d5abd5484a2ee0539aa5d065 /src/android | |
parent | Merge pull request #10622 from t895/load-settings (diff) | |
parent | android: Move settings to debug submenu (diff) | |
download | yuzu-2f7658bd75f0a4043567752b3ea0b9a66917a0f1.tar yuzu-2f7658bd75f0a4043567752b3ea0b9a66917a0f1.tar.gz yuzu-2f7658bd75f0a4043567752b3ea0b9a66917a0f1.tar.bz2 yuzu-2f7658bd75f0a4043567752b3ea0b9a66917a0f1.tar.lz yuzu-2f7658bd75f0a4043567752b3ea0b9a66917a0f1.tar.xz yuzu-2f7658bd75f0a4043567752b3ea0b9a66917a0f1.tar.zst yuzu-2f7658bd75f0a4043567752b3ea0b9a66917a0f1.zip |
Diffstat (limited to '')
7 files changed, 116 insertions, 104 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/model/Settings.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt index 6d3db53c0..8df20b928 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 7d55c5b2f..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 @@ -78,11 +79,10 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) } private fun addConfigSettings(sl: ArrayList<SettingsItem>) { - settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_advanced_settings)) + settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.advanced_settings)) 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,13 +104,19 @@ 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, 0, @@ -223,17 +227,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) private fun addGraphicsSettings(sl: ArrayList<SettingsItem>) { 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<SettingsItem>) { + 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/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 @@ <resources> <string-array name="regionNames"> - <item>@string/region_auto</item> - <item>@string/region_japan</item> - <item>@string/region_usa</item> - <item>@string/region_europe</item> + <item>@string/auto</item> <item>@string/region_australia</item> <item>@string/region_china</item> + <item>@string/region_europe</item> + <item>@string/region_japan</item> <item>@string/region_korea</item> <item>@string/region_taiwan</item> + <item>@string/region_usa</item> </string-array> <integer-array name="regionValues"> <item>-1</item> - <item>0</item> - <item>1</item> - <item>2</item> <item>3</item> <item>4</item> + <item>2</item> + <item>0</item> <item>5</item> <item>6</item> + <item>1</item> </integer-array> <string-array name="languageNames"> - <item>@string/language_japanese</item> + <item>@string/language_brazilian_portuguese</item> + <item>@string/language_british_english</item> + <item>@string/language_canadian_french</item> + <item>@string/language_chinese</item> + <item>@string/language_dutch</item> <item>@string/language_english</item> <item>@string/language_french</item> <item>@string/langauge_german</item> <item>@string/language_italian</item> - <item>@string/language_spanish</item> - <item>@string/language_chinese</item> + <item>@string/language_japanese</item> <item>@string/language_korean</item> - <item>@string/language_dutch</item> + <item>@string/language_latin_american_spanish</item> <item>@string/language_portuguese</item> <item>@string/language_russian</item> - <item>@string/language_taiwanese</item> - <item>@string/language_british_english</item> - <item>@string/language_canadian_french</item> - <item>@string/language_latin_american_spanish</item> <item>@string/language_simplified_chinese</item> + <item>@string/language_spanish</item> + <item>@string/language_taiwanese</item> <item>@string/language_traditional_chinese</item> - <item>@string/language_brazilian_portuguese</item> </string-array> <integer-array name="languageValues"> - <item>0</item> + <item>17</item> + <item>12</item> + <item>13</item> + <item>6</item> + <item>8</item> <item>1</item> <item>2</item> <item>3</item> <item>4</item> - <item>5</item> - <item>6</item> + <item>0</item> <item>7</item> - <item>8</item> + <item>14</item> <item>9</item> <item>10</item> - <item>11</item> - <item>12</item> - <item>13</item> - <item>14</item> <item>15</item> + <item>5</item> + <item>11</item> <item>16</item> - <item>17</item> </integer-array> <string-array name="rendererApiNames"> @@ -166,7 +166,7 @@ </integer-array> <string-array name="cpuAccuracyNames"> - <item>@string/cpu_accuracy_auto</item> + <item>@string/auto</item> <item>@string/cpu_accuracy_accurate</item> <item>@string/cpu_accuracy_unsafe</item> <item>@string/cpu_accuracy_paranoid</item> diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index fc24e27f5..f9b759532 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 @@ <string name="add_games_warning">Skip selecting games folder?</string> <string name="add_games_warning_description">Games won\'t be displayed in the Games list if a folder isn\'t selected.</string> <string name="add_games_warning_help">https://yuzu-emu.org/help/quickstart/#dumping-games</string> - <string name="home_search_games">Search Games</string> + <string name="home_search_games">Search games</string> <string name="games_dir_selected">Games directory selected</string> <string name="install_prod_keys">Install prod.keys</string> <string name="install_prod_keys_description">Required to decrypt retail games</string> @@ -77,8 +77,8 @@ <string name="install_gpu_driver_description">Install alternative drivers for potentially better performance or accuracy</string> <string name="advanced_settings">Advanced settings</string> <string name="settings_description">Configure emulator settings</string> - <string name="search_recently_played">Recently Played</string> - <string name="search_recently_added">Recently Added</string> + <string name="search_recently_played">Recently played</string> + <string name="search_recently_added">Recently added</string> <string name="search_retail">Retail</string> <string name="search_homebrew">Homebrew</string> <string name="open_user_folder">Open yuzu folder</string> @@ -124,39 +124,39 @@ <string name="are_you_interested">Are you interested?</string> <!-- General settings strings --> - <string name="frame_limit_enable">Enable limit speed</string> - <string name="frame_limit_enable_description">When enabled, emulation speed will be limited to a specified percentage of normal speed.</string> + <string name="frame_limit_enable">Limit speed</string> + <string name="frame_limit_enable_description">Limits emulation speed to a specified percentage of normal speed.</string> <string name="frame_limit_slider">Limit speed percent</string> - <string name="frame_limit_slider_description">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.</string> + <string name="frame_limit_slider_description">Specifies the percentage to limit emulation speed. 100% is the normal speed. Values higher or lower will increase or decrease the speed limit.</string> <string name="cpu_accuracy">CPU accuracy</string> <!-- System settings strings --> - <string name="use_docked_mode">Docked mode</string> - <string name="use_docked_mode_description">Emulates in docked mode, which increases the resolution at the expense of performance.</string> + <string name="use_docked_mode">Docked Mode</string> + <string name="use_docked_mode_description">Increases resolution, decreasing performance. Handheld Mode is used when disabled, lowering resolution and increasing performance.</string> <string name="emulated_region">Emulated region</string> <string name="emulated_language">Emulated language</string> - <string name="select_rtc_date">Select RTC Date</string> - <string name="select_rtc_time">Select RTC Time</string> - <string name="use_custom_rtc">Enable Custom RTC</string> - <string name="use_custom_rtc_description">This setting allows you to set a custom real time clock separate from your current system time</string> - <string name="set_custom_rtc">Set Custom RTC</string> + <string name="select_rtc_date">Select RTC date</string> + <string name="select_rtc_time">Select RTC time</string> + <string name="use_custom_rtc">Custom RTC</string> + <string name="use_custom_rtc_description">Allows you to set a custom real-time clock separate from your current system time.</string> + <string name="set_custom_rtc">Set custom RTC</string> <!-- Graphics settings strings --> <string name="renderer_api">API</string> <string name="renderer_accuracy">Accuracy level</string> - <string name="renderer_resolution">Resolution</string> + <string name="renderer_resolution">Resolution (Handheld/Docked)</string> <string name="renderer_vsync">VSync mode</string> - <string name="renderer_aspect_ratio">Aspect Ratio</string> - <string name="renderer_scaling_filter">Window Adapting Filter</string> - <string name="renderer_anti_aliasing">Anti-Aliasing Method</string> + <string name="renderer_aspect_ratio">Aspect ratio</string> + <string name="renderer_scaling_filter">Window adapting filter</string> + <string name="renderer_anti_aliasing">Anti-aliasing method</string> <string name="renderer_force_max_clock">Force maximum clocks (Adreno only)</string> <string name="renderer_force_max_clock_description">Forces the GPU to run at the maximum possible clocks (thermal constraints will still be applied).</string> <string name="renderer_asynchronous_shaders">Use asynchronous shaders</string> - <string name="renderer_asynchronous_shaders_description">Compiles shaders asynchronously, which will reduce stutter but may introduce glitches.</string> - <string name="renderer_debug">Enable graphics debugging</string> - <string name="renderer_debug_description">When checked, the graphics API enters a slower debugging mode.</string> - <string name="use_disk_shader_cache">Use disk shader cache</string> - <string name="use_disk_shader_cache_description">Reduce stuttering by storing and loading generated shaders to disk.</string> + <string name="renderer_asynchronous_shaders_description">Compiles shaders asynchronously, reducing stutter but may introduce glitches.</string> + <string name="renderer_debug">Graphics debugging</string> + <string name="renderer_debug_description">Sets the graphics API to a slow debugging mode.</string> + <string name="use_disk_shader_cache">Disk shader cache</string> + <string name="use_disk_shader_cache_description">Reduces stuttering by locally storing and loading generated shaders.</string> <!-- Audio settings strings --> <string name="audio_volume">Volume</string> @@ -171,10 +171,12 @@ <string name="reset_setting_confirmation">Do you want to reset this setting back to its default value?</string> <string name="reset_to_default">Reset to default</string> <string name="reset_all_settings">Reset all settings?</string> - <string name="reset_all_settings_description">All Advanced Settings will be reset to their default configuration. This can not be undone.</string> + <string name="reset_all_settings_description">All advanced settings will be reset to their default configuration. This can not be undone.</string> <string name="settings_reset">Settings reset</string> <string name="close">Close</string> - <string name="learn_more">Learn More</string> + <string name="learn_more">Learn more</string> + <string name="auto">Auto</string> + <string name="submit">Submit</string> <!-- GPU driver installation --> <string name="select_gpu_driver">Select GPU driver</string> @@ -188,13 +190,13 @@ <string name="installing_driver">Installing driver…</string> <!-- Preferences Screen --> - <string name="preferences_advanced_settings">Advanced Settings</string> <string name="preferences_settings">Settings</string> <string name="preferences_general">General</string> <string name="preferences_system">System</string> <string name="preferences_graphics">Graphics</string> <string name="preferences_audio">Audio</string> <string name="preferences_theme">Theme and color</string> + <string name="preferences_debug">Debug</string> <!-- ROM loading errors --> <string name="loader_error_encrypted">Your ROM is encrypted</string> @@ -206,29 +208,29 @@ <string name="loader_error_file_not_found">ROM file does not exist</string> <!-- Emulation Menu --> - <string name="emulation_exit">Exit Emulation</string> + <string name="emulation_exit">Exit emulation</string> <string name="emulation_done">Done</string> - <string name="emulation_fps_counter">FPS Counter</string> - <string name="emulation_toggle_controls">Toggle Controls</string> - <string name="emulation_rel_stick_center">Relative Stick Center</string> - <string name="emulation_dpad_slide">DPad Slide</string> - <string name="emulation_haptics">Haptics</string> - <string name="emulation_show_overlay">Show Overlay</string> - <string name="emulation_toggle_all">Toggle All</string> - <string name="emulation_control_adjust">Adjust Overlay</string> + <string name="emulation_fps_counter">FPS counter</string> + <string name="emulation_toggle_controls">Toggle controls</string> + <string name="emulation_rel_stick_center">Relative stick center</string> + <string name="emulation_dpad_slide">D-pad slide</string> + <string name="emulation_haptics">Touch haptics</string> + <string name="emulation_show_overlay">Show overlay</string> + <string name="emulation_toggle_all">Toggle all</string> + <string name="emulation_control_adjust">Adjust overlay</string> <string name="emulation_control_scale">Scale</string> <string name="emulation_control_opacity">Opacity</string> - <string name="emulation_touch_overlay_reset">Reset Overlay</string> - <string name="emulation_touch_overlay_edit">Edit Overlay</string> - <string name="emulation_pause">Pause Emulation</string> - <string name="emulation_unpause">Unpause Emulation</string> - <string name="emulation_input_overlay">Overlay Options</string> + <string name="emulation_touch_overlay_reset">Reset overlay</string> + <string name="emulation_touch_overlay_edit">Edit overlay</string> + <string name="emulation_pause">Pause emulation</string> + <string name="emulation_unpause">Unpause emulation</string> + <string name="emulation_input_overlay">Overlay options</string> <string name="emulation_game_loading">Game loading…</string> - <string name="load_settings">Loading Settings…</string> + <string name="load_settings">Loading settings…</string> <!-- Software keyboard --> - <string name="software_keyboard">Software Keyboard</string> + <string name="software_keyboard">Software keyboard</string> <!-- Errors and warnings --> <string name="abort_button">Abort</string> @@ -242,7 +244,6 @@ <string name="performance_warning">Turning off this setting will significantly reduce emulation performance! For the best experience, it is recommended that you leave this setting enabled.</string> <!-- Region Names --> - <string name="region_auto">Auto-select</string> <string name="region_japan">Japan</string> <string name="region_usa">USA</string> <string name="region_europe">Europe</string> @@ -312,18 +313,17 @@ <string name="ratio_force_four_three">Force 4:3</string> <string name="ratio_force_twenty_one_nine">Force 21:9</string> <string name="ratio_force_sixteen_ten">Force 16:10</string> - <string name="ratio_stretch">Stretch to Window</string> + <string name="ratio_stretch">Stretch to window</string> <!-- CPU Accuracy --> - <string name="cpu_accuracy_auto">Auto</string> <string name="cpu_accuracy_accurate">Accurate</string> <string name="cpu_accuracy_unsafe">Unsafe</string> <string name="cpu_accuracy_paranoid">Paranoid (Slow)</string> <!-- Gamepad Buttons --> - <string name="gamepad_d_pad">D-Pad</string> - <string name="gamepad_left_stick">Left Stick</string> - <string name="gamepad_right_stick">Right Stick</string> + <string name="gamepad_d_pad">D-pad</string> + <string name="gamepad_left_stick">Left stick</string> + <string name="gamepad_right_stick">Right stick</string> <string name="gamepad_home">Home</string> <string name="gamepad_screenshot">Screenshot</string> @@ -332,18 +332,18 @@ <string name="building_shaders">Building shaders</string> <!-- Theme options --> - <string name="change_app_theme">Change App Theme</string> + <string name="change_app_theme">Change app theme</string> <string name="theme_default">Default</string> <string name="theme_material_you">Material You</string> <!-- Theme Modes --> - <string name="change_theme_mode">Change Theme Mode</string> + <string name="change_theme_mode">Change theme mode</string> <string name="theme_mode_follow_system">Follow System</string> <string name="theme_mode_light">Light</string> <string name="theme_mode_dark">Dark</string> <!-- Black backgrounds theme --> - <string name="use_black_backgrounds">Use Black Backgrounds</string> + <string name="use_black_backgrounds">Black backgrounds</string> <string name="use_black_backgrounds_description">When using the dark theme, apply black backgrounds.</string> </resources> |