summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.kt3
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.kt24
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt66
-rw-r--r--Source/Android/app/src/main/res/values/strings.xml13
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 b6a03e6b61..cfa2377b98 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
@@ -678,7 +678,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 1f68bbbd1a..c7df70f1fc 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
@@ -1974,16 +1974,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 855cb56ab8..f282ab7675 100644
--- a/Source/Android/app/src/main/res/values/strings.xml
+++ b/Source/Android/app/src/main/res/values/strings.xml
@@ -338,7 +338,18 @@
<string name="dump_mip_texture_description">Whether to dump mipmapped game textures to User/Dump/Textures/&lt;game_id&gt;/.</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>