diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2026-05-23 20:53:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-23 20:53:31 +0200 |
| commit | d3217f65c3d033db9db79160e51c769175469098 (patch) | |
| tree | 7ada43496b2c38b4ec9f9e37f1e35a99ecb22f07 /Source/Android/app/src | |
| parent | 57f1dc97e0e94024f3f931ec03dfd4a18811e670 (diff) | |
| parent | 17b4b8fc07f9994f0f5596ef462730260e4595bb (diff) | |
Merge pull request #14506 from adamscott/crop-that-screen
Add screen crop feature
Diffstat (limited to 'Source/Android/app/src')
4 files changed, 100 insertions, 6 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt index cd0ea42d94..8edd5bd26c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt @@ -679,7 +679,8 @@ enum class BooleanSetting( SYSCONF_WIIMOTE_MOTOR(Settings.FILE_SYSCONF, "BT", "MOT", true), GFX_VSYNC(Settings.FILE_GFX, Settings.SECTION_GFX_HARDWARE, "VSync", false), GFX_WIDESCREEN_HACK(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "wideScreenHack", false), - GFX_CROP(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "Crop", false), + GFX_CROP_TO_ASPECT_RATIO(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "Crop", false), + GFX_CROP_CUSTOM(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "CropCustom", false), GFX_SHOW_FPS(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "ShowFPS", false), GFX_SHOW_FTIMES(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "ShowFTimes", false), GFX_SHOW_VPS(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "ShowVPS", false), diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.kt index faf9f71ea0..1802357e0d 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.kt @@ -133,6 +133,30 @@ enum class IntSetting( "PerfSampWindowMS", 1000 ), + GFX_CROP_CUSTOM_TOP( + Settings.FILE_GFX, + Settings.SECTION_GFX_SETTINGS, + "CropCustomTop", + 0 + ), + GFX_CROP_CUSTOM_BOTTOM( + Settings.FILE_GFX, + Settings.SECTION_GFX_SETTINGS, + "CropCustomBottom", + 0 + ), + GFX_CROP_CUSTOM_LEFT( + Settings.FILE_GFX, + Settings.SECTION_GFX_SETTINGS, + "CropCustomLeft", + 0 + ), + GFX_CROP_CUSTOM_RIGHT( + Settings.FILE_GFX, + Settings.SECTION_GFX_SETTINGS, + "CropCustomRight", + 0 + ), LOGGER_VERBOSITY(Settings.FILE_LOGGER, Settings.SECTION_LOGGER_OPTIONS, "Verbosity", 1), WIIMOTE_1_SOURCE(Settings.FILE_WIIMOTE, "Wiimote1", "Source", 1), WIIMOTE_2_SOURCE(Settings.FILE_WIIMOTE, "Wiimote2", "Source", 0), diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt index 32a7a64025..78e36f7b42 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt @@ -2006,16 +2006,74 @@ class SettingsFragmentPresenter( ) ) - sl.add(HeaderSetting(context, R.string.misc, 0)) + sl.add(HeaderSetting(context, R.string.crop, 0)) sl.add( SwitchSetting( context, - BooleanSetting.GFX_CROP, - R.string.crop, - R.string.crop_description + BooleanSetting.GFX_CROP_TO_ASPECT_RATIO, + R.string.crop_to_aspect_ratio, + R.string.crop_to_aspect_ratio_description + ) + ) + sl.add( + SwitchSetting( + context, + BooleanSetting.GFX_CROP_CUSTOM, + R.string.crop_custom, + R.string.crop_custom_description + ) + ) + sl.add( + IntSliderSetting( + context, + IntSetting.GFX_CROP_CUSTOM_TOP, + R.string.crop_custom_top, + R.string.crop_custom_top_description, + 0, + 528, + "px", + 1, + ) + ) + sl.add( + IntSliderSetting( + context, + IntSetting.GFX_CROP_CUSTOM_BOTTOM, + R.string.crop_custom_bottom, + R.string.crop_custom_bottom_description, + 0, + 528, + "px", + 1, ) ) sl.add( + IntSliderSetting( + context, + IntSetting.GFX_CROP_CUSTOM_LEFT, + R.string.crop_custom_left, + R.string.crop_custom_left_description, + min=0, + max=640, + units="px", + stepSize=1, + ) + ) + sl.add( + IntSliderSetting( + context, + IntSetting.GFX_CROP_CUSTOM_RIGHT, + R.string.crop_custom_right, + R.string.crop_custom_right_description, + 0, + 640, + "px", + 1, + ) + ) + + sl.add(HeaderSetting(context, R.string.misc, 0)) + sl.add( SwitchSetting( context, BooleanSetting.SYSCONF_PROGRESSIVE_SCAN, diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 04c48bcba4..4e618c91ba 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -342,7 +342,18 @@ <string name="dump_mip_texture_description">Whether to dump mipmapped game textures to User/Dump/Textures/<game_id>/.</string> <string name="misc">Misc</string> <string name="crop">Crop</string> - <string name="crop_description">Crops the picture from its native aspect ratio to 4:3 or 16:9. If unsure, leave this unchecked.</string> + <string name="crop_to_aspect_ratio">To Aspect Ratio</string> + <string name="crop_to_aspect_ratio_description">Crops the picture from its native aspect ratio to 4:3 or 16:9. If unsure, leave this unchecked.</string> + <string name="crop_custom">Custom</string> + <string name="crop_custom_description">Enables options to crop the picture by discrete native pixels (independent of the internal resolution setting) in order to attain a specific user target aspect ratio. Useful to resolve letterboxing issues. If unsure, leave this unchecked.</string> + <string name="crop_custom_top">Custom Top</string> + <string name="crop_custom_top_description">Crops the picture top side by discrete native pixels (independent of the internal resolution setting) in order to attain a specific user target aspect ratio. If unsure, leave this value to 0.</string> + <string name="crop_custom_bottom">Custom Bottom</string> + <string name="crop_custom_bottom_description">Crops the picture bottom side by discrete native pixels (independent of the internal resolution setting) in order to attain a specific user target aspect ratio. If unsure, leave this value to 0.</string> + <string name="crop_custom_left">Custom Left</string> + <string name="crop_custom_left_description">Crops the picture left side by discrete native pixels (independent of the internal resolution setting) in order to attain a specific user target aspect ratio. If unsure, leave this value to 0.</string> + <string name="crop_custom_right">Custom Right</string> + <string name="crop_custom_right_description">Crops the picture right side by discrete native pixels (independent of the internal resolution setting) in order to attain a specific user target aspect ratio. If unsure, leave this value to 0.</string> <string name="progressive_scan">Enable Progressive Scan</string> <string name="vsync">V-Sync</string> <string name="vsync_description">This setting is unnecessary on most Android devices, because Android always enables V-Sync. If unsure, leave this unchecked.</string> |
