Android: Replace inline strings with string resource references

This commit is contained in:
Connor McLaughlin
2020-12-08 01:35:13 +10:00
parent 98d6b49987
commit e340963c99
12 changed files with 277 additions and 180 deletions

View File

@ -17,7 +17,7 @@
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
<ListPreference
app:key="CPU/Overclock"
app:title="CPU Overclocking"
app:title="@string/settings_cpu_overclocking"
app:defaultValue="100"
app:entries="@array/settings_advanced_cpu_overclock_entries"
app:entryValues="@array/settings_advanced_cpu_overclock_values"
@ -25,46 +25,46 @@
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="CDROM/RegionCheck"
app:title="CD-ROM Region Check"
app:title="@string/settings_cdrom_region_check"
app:defaultValue="false"
app:summary="Prevents discs from incorrect regions being read by the emulator. Usually safe to disable."
app:summary="@string/settings_summary_cdrom_region_check"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="CDROM/LoadImageToRAM"
app:title="CD-ROM Preload Image to RAM"
app:title="@string/settings_cdrom_preload_image_to_ram"
app:defaultValue="false"
app:summary="Loads the game image into RAM. Useful for network paths that may become unreliable during gameplay. In some cases also eliminates stutter when games initiate audio track playback."
app:summary="@string/settings_summary_preload_image_to_ram"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/PGXPVertexCache"
app:title="PGXP Vertex Cache"
app:title="@string/settings_pgxp_vertex_cache"
app:defaultValue="false"
app:summary="Uses screen coordinates as a fallback when tracking vertices through memory fails. May improve PGXP compatibility."
app:summary="@string/settings_summary_pgxp_vertex_cache"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/PGXPCPU"
app:title="PGXP CPU Mode"
app:title="@string/settings_pgxp_cpu_mode"
app:defaultValue="false"
app:summary="Tries to track vertex manipulation through the CPU. Some games require this option for PGXP to be effective. Very slow, and incompatible with the recompiler."
app:summary="@string/settings_summary_pgxp_cpu_mode"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="CPU/RecompilerICache"
app:title="CPU Recompiler ICache"
app:title="@string/settings_cpu_recompiler_icache"
app:defaultValue="false"
app:summary="Determines whether the CPU's instruction cache is simulated in the recompiler. Improves accuracy at a small cost to performance. If games are running too fast, try enabling this option."
app:summary="@string/settings_summary_cpu_recompiler_icache"
app:iconSpaceReserved="false" />
<ListPreference
app:key="CPU/FastmemMode"
app:title="CPU Recompiler Fast Memory Access"
app:title="@string/settings_cpu_recompiler_fastmem"
app:entries="@array/settings_cpu_fastmem_mode_entries"
app:entryValues="@array/settings_cpu_fastmem_mode_values"
app:useSimpleSummaryProvider="true"
app:defaultValue="MMap"
app:summary="Makes guest memory access more efficient by using page faults and backpatching. Disable if it is unstable on your device."
app:summary="@string/settings_summary_cpu_recompiler_fastmem"
app:iconSpaceReserved="false" />
<ListPreference
app:key="Display/MaxFPS"
app:title="Presented Frame Limit"
app:title="@string/settings_presented_frame_limit"
app:defaultValue="60"
app:entries="@array/settings_advanced_display_fps_limit_entries"
app:entryValues="@array/settings_advanced_display_fps_limit_values"
@ -77,7 +77,7 @@
app:iconSpaceReserved="false" />
<ListPreference
app:key="Logging/LogLevel"
app:title="Logging Level"
app:title="@string/settings_logging_level"
app:defaultValue="Warning"
app:entries="@array/settings_log_level_entries"
app:entryValues="@array/settings_log_level_values"
@ -85,15 +85,15 @@
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Logging/LogToFile"
app:title="Log To File"
app:title="@string/settings_log_to_file"
app:defaultValue="false"
app:summary="Writes log messages to duckstation.log in your user directory. Only use for debugging as it slows down emulation."
app:summary="@string/settings_summary_log_to_file"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Logging/LogToDebug"
app:title="Log To Logcat"
app:title="@string/settings_log_to_logcat"
app:defaultValue="false"
app:summary="Writes log messages to the Android message logger. Only useful when attached to a computer with adb."
app:summary="@string/settings_summary_log_to_logcat"
app:iconSpaceReserved="false" />
</PreferenceScreen>

View File

@ -19,8 +19,8 @@
<SeekBarPreference
app:key="Audio/OutputVolume"
app:title="Volume"
app:summary="Controls the volume of the emulator's sound output."
app:title="@string/settings_volume"
app:summary="@string/settings_summary_volume"
app:defaultValue="100"
android:max="100"
app:min="0"
@ -28,19 +28,19 @@
app:showSeekBarValue="true" />
<SwitchPreferenceCompat
app:key="Audio/OutputMuted"
app:title="Mute All Sound"
app:title="@string/settings_mute_all_sound"
app:defaultValue="false"
app:summary="Prevents the emulator from emitting any sound."
app:summary="@string/settings_summary_mute_all_sound"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="CDROM/MuteCDAudio"
app:title="Mute CD Audio"
app:title="@string/settings_mute_cd_audio"
app:defaultValue="false"
app:summary="Forcibly mutes both CD-DA and XA audio from the CD-ROM. Can be used to disable background music in some games."
app:summary="@string/settings_summary_mute_cd_audio"
app:iconSpaceReserved="false" />
<ListPreference
app:key="Audio/Backend"
app:title="Audio Backend"
app:title="@string/settings_audio_backend"
app:entries="@array/settings_audio_backend_entries"
app:entryValues="@array/settings_audio_backend_values"
app:defaultValue="OpenSLES"
@ -48,18 +48,18 @@
app:iconSpaceReserved="false" />
<ListPreference
app:key="Audio/BufferSize"
app:title="Audio Buffer Size"
app:title="@string/settings_audio_buffer_size"
app:entries="@array/settings_audio_buffer_size_entries"
app:entryValues="@array/settings_audio_buffer_size_values"
app:defaultValue="2048"
app:summary="Determines the latency between audio being generated and output to speakers. Smaller values reduce latency, but variations in emulation speed will cause hitches."
app:summary="@string/settings_summary_audio_buffer_size"
app:useSimpleSummaryProvider="true"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Audio/Sync"
app:title="Audio Sync"
app:title="@string/settings_audio_sync"
app:defaultValue="true"
app:summary="Throttles the emulation speed based on the audio backend pulling audio frames. This helps to remove noises or crackling if emulation is too fast. Sync will automatically be disabled if not running at 100% speed."
app:summary="@string/settings_summary_audio_sync"
app:iconSpaceReserved="false" />
</PreferenceScreen>

View File

@ -18,7 +18,7 @@
<ListPreference
app:key="Controller1/Type"
app:title="Controller Type"
app:title="@string/settings_controller_type"
app:entries="@array/settings_controller_type_entries"
app:entryValues="@array/settings_controller_type_values"
app:defaultValue="DigitalController"
@ -26,12 +26,12 @@
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Controller1/AutoEnableAnalog"
app:title="Enable Analog Mode On Reset"
app:title="@string/settings_enable_analog_mode_on_reset"
app:defaultValue="true"
app:iconSpaceReserved="false" />
<ListPreference
app:key="Controller1/TouchscreenControllerView"
app:title="Touchscreen Controller View"
app:title="@string/settings_touchscreen_controller_view"
app:entries="@array/settings_touchscreen_controller_view_entries"
app:entryValues="@array/settings_touchscreen_controller_view_values"
app:defaultValue="digital"
@ -39,27 +39,27 @@
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Controller1/AutoHideTouchscreenController"
app:title="Auto-Hide Touchscreen Controller"
app:title="@string/settings_auto_hide_touchscreen_controller"
app:defaultValue="false"
app:summary="Hides the touchscreen controller when an external controller is detected."
app:summary="@string/settings_summary_auto_hide_touchscreen_controller"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Controller1/HapticFeedback"
app:title="Vibrate On Press"
app:title="@string/settings_vibrate_on_press"
app:defaultValue="false"
app:summary="Enables a short vibration when a touchscreen button is pressed. Requires &quot;Vibrate on Touch&quot; to be enabled on your device."
app:summary="@string/settings_summary_vibrate_on_press"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Controller1/Vibration"
app:title="Enable Vibration"
app:title="@string/settings_enable_vibration"
app:defaultValue="false"
app:summary="Forwards rumble from the game to the phone's vibration motor."
app:summary="@string/settings_summary_enable_vibration"
app:iconSpaceReserved="false" />
<ListPreference
app:key="MemoryCards/Card1Type"
app:title="Memory Card 1 Type"
app:title="@string/settings_memory_card_1_type"
app:entries="@array/settings_memory_card_mode_entries"
app:entryValues="@array/settings_memory_card_mode_values"
app:defaultValue="PerGameTitle"
@ -67,7 +67,7 @@
app:iconSpaceReserved="false" />
<ListPreference
app:key="MemoryCards/Card2Type"
app:title="Memory Card 2 Type"
app:title="@string/settings_memory_card_2_type"
app:entries="@array/settings_memory_card_mode_entries"
app:entryValues="@array/settings_memory_card_mode_values"
app:defaultValue="None"

View File

@ -18,7 +18,7 @@
<ListPreference
app:key="Display/CropMode"
app:title="Crop Mode"
app:title="@string/settings_crop_mode"
app:entries="@array/settings_display_crop_mode_entries"
app:entryValues="@array/settings_display_crop_mode_values"
app:defaultValue="Overscan"
@ -27,7 +27,7 @@
<ListPreference
app:key="Display/AspectRatio"
app:title="Aspect Ratio"
app:title="@string/settings_aspect_ratio"
app:entries="@array/settings_display_aspect_ratio_names"
app:entryValues="@array/settings_display_aspect_ratio_values"
app:defaultValue="4:3"
@ -36,41 +36,41 @@
<SwitchPreferenceCompat
app:key="Display/LinearFiltering"
app:title="Linear Upscaling"
app:title="@string/settings_linear_upscaling"
app:defaultValue="true"
app:summary="Smooths out the image when upscaling the console to the screen."
app:summary="@string/settings_summary_linear_upscaling"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Display/IntegerScaling"
app:title="Integer Upscaling"
app:title="@string/settings_integer_upscaling"
app:defaultValue="false"
app:summary="Adds padding to the display area to ensure that the ratio between pixels on the host to pixels in the console is an integer number. May result in a sharper image in some 2D games."
app:summary="@string/settings_summary_integer_upscaling"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Display/ShowOSDMessages"
app:title="@string/settings_osd_show_messages"
app:defaultValue="true"
app:summary="Shows on-screen-display messages when events occur such as save states being created/loaded, screenshots being taken, etc."
app:summary="@string/settings_summary_osd_show_messages"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Display/ShowSpeed"
app:title="@string/settings_osd_show_speed"
app:defaultValue="false"
app:summary="Sets the target emulation speed. It is not guaranteed that this speed will be reached, and if not, the emulator will run as fast as it can manage."
app:summary="@string/settings_summary_osd_show_speed"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Display/ShowFPS"
app:title="@string/settings_osd_show_show_fps"
app:defaultValue="false"
app:summary="Shows the internal frame rate of the game in the top-right corner of the display."
app:summary="@string/settings_summary_osd_show_fps"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Display/ShowVPS"
app:title="@string/settings_osd_show_show_vps"
app:defaultValue="false"
app:summary="Shows the number of frames (or v-syncs) displayed per second by the system in the top-right corner of the display."
app:summary="@string/settings_summary_osd_show_vps"
app:iconSpaceReserved="false" />
</PreferenceScreen>

View File

@ -17,18 +17,18 @@
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
<ListPreference
app:key="CDROM/ReadSpeedup"
app:title="CD-ROM Read Speedup"
app:title="@string/settings_cdrom_read_speedup"
app:entries="@array/settings_cdrom_read_speedup_entries"
app:entryValues="@array/settings_cdrom_read_speedup_values"
app:defaultValue="1"
app:summary="Speeds up CD-ROM reads by the specified factor. Only applies to double-speed reads, and is ignored when audio is playing. May improve loading speeds in some games, at the cost of breaking others."
app:summary="@string/settings_summary_cdrom_read_speedup"
app:useSimpleSummaryProvider="true"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="BIOS/PatchFastBoot"
app:title="@string/settings_console_fast_boot"
app:defaultValue="false"
app:summary="Skips the BIOS shell/intro, booting directly into the game. Usually safe to enable, but some games break."
app:summary="@string/settings_summary_console_fast_boot"
app:iconSpaceReserved="false" />
<ListPreference
app:key="GPU/ResolutionScale"
@ -40,7 +40,7 @@
app:iconSpaceReserved="false" />
<ListPreference
app:key="GPU/MSAA"
app:title="Multisample Antialiasing"
app:title="@string/settings_msaa"
app:entries="@array/settings_gpu_msaa_entries"
app:entryValues="@array/settings_gpu_msaa_values"
app:defaultValue="1"
@ -48,27 +48,27 @@
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/TrueColor"
app:title="True Color Rendering (24-bit, disables dithering)"
app:summary="This produces nicer looking gradients at the cost of making some colours look slightly different. Disabling the option also enables dithering. Most games are compatible with this option."
app:title="@string/settings_true_color"
app:summary="@string/settings_summary_true_color"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/ScaledDithering"
app:title="Scaled Dithering (scale dither pattern to resolution)"
app:title="@string/settings_scaled_dithering"
app:defaultValue="true"
app:summary="Scales the dither pattern to the resolution scale of the emulated GPU. This makes the dither pattern much less obvious at higher resolutions. Usually safe to enable, and only supported by the hardware renderers."
app:summary="@string/settings_summary_scaled_dithering"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/DisableInterlacing"
app:title="Disable Interlacing (force progressive render/scan)"
app:title="@string/settings_disable_interlacing"
app:defaultValue="true"
app:summary="Forces the rendering and display of frames to progressive mode. This removes the &quot;combing&quot; effect seen in 480i games by rendering them in 480p. Usually safe to enable."
app:summary="@string/settings_summary_disable_interlacing"
app:iconSpaceReserved="false" />
<ListPreference
app:key="GPU/TextureFilter"
app:title="Texture Filtering"
app:title="@string/settings_texture_filtering"
app:entries="@array/settings_gpu_texture_filter_names"
app:entryValues="@array/settings_gpu_texture_filter_values"
app:defaultValue="Nearest"
@ -77,58 +77,58 @@
<SwitchPreferenceCompat
app:key="GPU/ForceNTSCTimings"
app:title="Force NTSC Timings (60hz-on-PAL)"
app:title="@string/settings_force_ntsc_timings"
app:defaultValue="false"
app:summary="Uses NTSC frame timings when the console is in PAL mode, forcing PAL games to run at 60hz."
app:summary="@string/settings_summary_force_ntsc_timings"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/WidescreenHack"
app:title="Widescreen Hack"
app:title="@string/settings_widescreen_hack"
app:defaultValue="false"
app:summary="Scales vertex positions in screen-space to a widescreen aspect ratio, essentially increasing the field of view from 4:3 to 16:9 in 3D games. Not be compatible with all games."
app:summary="@string/settings_summary_widescreen_hack"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Display/Force4_3For24Bit"
app:title="Force 4:3 For 24-Bit Display"
app:title="@string/settings_force_4_3_for_24bit"
app:defaultValue="false"
app:summary="Switches back to 4:3 display aspect ratio when displaying 24-bit content, usually FMVs."
app:summary="@string/settings_summary_force_4_3_for_24bit"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/ChromaSmoothing24Bit"
app:title="Chroma Smoothing For 24-Bit Display"
app:title="@string/settings_chroma_smoothing_24bit"
app:defaultValue="false"
app:summary="Smooths out blockyness between colour transitions in 24-bit content, usually FMVs. Only applies to the hardware renderers."
app:summary="@string/settings_summary_chrome_smoothing_24bit"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/PGXPEnable"
app:title="PGXP Geometry Correction"
app:title="@string/settings_pgxp_geometry_correction"
app:defaultValue="false"
app:summary="Reduces &quot;wobbly&quot; polygons and &quot;warping&quot; textures that are common in PS1 games. >Only works with the hardware renderers. May not be compatible with all games."
app:summary="@string/settings_summary_pgxp_geometry_correction"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/PGXPCulling"
app:title="PGXP Culling Correction"
app:title="@string/settings_pgxp_culling_correction"
app:defaultValue="true"
app:summary="Increases the precision of polygon culling, reducing the number of holes in geometry. Requires geometry correction enabled."
app:summary="@string/settings_summary_pgxp_culling_correction"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/PGXPTextureCorrection"
app:title="PGXP Texture Correction"
app:title="@string/settings_pgxp_texture_correction"
app:defaultValue="true"
app:summary="Uses perspective-correct interpolation for texture coordinates and colors, straightening out warped textures. Requires geometry correction enabled."
app:summary="@string/settings_summary_pgxp_texture_correction"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="GPU/PGXPPreserveProjFP"
app:title="PGXP Preserve Projection Precision"
app:title="@string/settings_pgxp_preserve_projection_precision"
app:defaultValue="false"
app:summary="Enables additional precision for PGXP. May improve visuals in some games but break others."
app:summary="@string/settings_summary_pgxp_preserve_projection_precision"
app:iconSpaceReserved="false" />
</PreferenceScreen>

View File

@ -18,7 +18,7 @@
<ListPreference
app:key="Main/EmulationSpeed"
app:title="Emulation Speed"
app:title="@string/settings_emulation_speed"
app:entries="@array/settings_emulation_speed_entries"
app:entryValues="@array/settings_emulation_speed_values"
app:defaultValue="1.0"
@ -26,7 +26,7 @@
app:iconSpaceReserved="false" />
<ListPreference
app:key="Main/FastForwardSpeed"
app:title="Fast Forward Speed"
app:title="@string/settings_fast_forward_speed"
app:entries="@array/settings_emulation_speed_entries"
app:entryValues="@array/settings_emulation_speed_values"
app:defaultValue="0.0"
@ -34,19 +34,19 @@
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Main/SaveStateOnExit"
app:title="Save State On Exit"
app:title="@string/settings_save_state_on_exit"
app:defaultValue="true"
app:summary="Automatically saves the emulator state when powering down or exiting. You can then resume directly from where you left off next time."
app:summary="@string/settings_summary_save_state_on_exit"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Main/PauseOnMenu"
app:title="Pause When Menu Opened"
app:title="@string/settings_pause_when_menu_opened"
app:defaultValue="false"
app:summary="Pauses emulation when ingame and the menu is opened."
app:summary="@string/settings_summary_pause_when_menu_opened"
app:iconSpaceReserved="false" />
<ListPreference
app:key="Main/EmulationScreenOrientation"
app:title="Emulation Screen Orientation"
app:title="@string/settings_emulation_screen_orientation"
app:entries="@array/settings_emulation_screen_orientation_entries"
app:entryValues="@array/settings_emulation_screen_orientation_values"
app:defaultValue="unspecified"
@ -54,28 +54,28 @@
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Main/AutoLoadCheats"
app:title="Load Patch Codes"
app:title="@string/settings_load_patch_codes"
app:defaultValue="false"
app:summary="Loads patch codes from cheats/&lt;game name&gt;.cht in PCSXR format. Codes can be toggled while ingame."
app:summary="@string/settings_summary_load_patch_codes"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Main/ApplyGameSettings"
app:title="Apply Compatibility Settings"
app:title="@string/settings_apply_compatibility_settings"
app:defaultValue="true"
app:summary="Automatically disable enhancements when they are not supported by games."
app:summary="@string/settings_summary_apply_compatibility_settings"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
app:key="Display/VSync"
app:title="Video Sync"
app:title="@string/settings_video_sync"
app:defaultValue="false"
app:summary="Enable this option to match DuckStation's refresh rate with your current monitor or screen. VSync is automatically disabled when it is not possible (e.g. running at non-100% speed)."
app:summary="@string/settings_summary_video_sync"
app:iconSpaceReserved="false" />
<ListPreference
app:key="Console/Region"
app:title="@string/settings_console_region"
app:entries="@array/settings_console_region_entries"
app:entryValues="@array/settings_console_region_values"
app:defaultValue="@string/settings_console_region_default"
app:defaultValue="Auto"
app:useSimpleSummaryProvider="true"
app:iconSpaceReserved="false" />