Merge pull request #1908 from Sonicadvance1/Android_aspect_ratio
[Android] Expose aspect ratio to the video settings.
This commit is contained in:
commit
bb042fe10f
|
@ -169,4 +169,18 @@
|
||||||
<item>2</item>
|
<item>2</item>
|
||||||
<item>3</item>
|
<item>3</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Aspect Ratio Preference -->
|
||||||
|
<string-array name="aspectRatioEntries" translatable="false">
|
||||||
|
<item>Auto</item>
|
||||||
|
<item>Force 16:9</item>
|
||||||
|
<item>Force 4:3</item>
|
||||||
|
<item>Stretch To Window</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="aspectRatioValues" translatable="false">
|
||||||
|
<item>0</item>
|
||||||
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>3</item>
|
||||||
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -210,6 +210,8 @@
|
||||||
<string name="disable_destination_alpha_descrip">Disables emulation of a hardware feature called destination alpha, which is used in many games for various effects.</string>
|
<string name="disable_destination_alpha_descrip">Disables emulation of a hardware feature called destination alpha, which is used in many games for various effects.</string>
|
||||||
<string name="fast_depth_calculation">Fast Depth Calculation</string>
|
<string name="fast_depth_calculation">Fast Depth Calculation</string>
|
||||||
<string name="fast_depth_calculation_descrip">Uses a less accurate algorithm to calculate depth values.</string>
|
<string name="fast_depth_calculation_descrip">Uses a less accurate algorithm to calculate depth values.</string>
|
||||||
|
<string name="aspect_ratio">Aspect Ratio</string>
|
||||||
|
<string name="aspect_ratio_descrip">Select what aspect ratio to use when rendering</string>
|
||||||
|
|
||||||
<!-- Miscellaneous -->
|
<!-- Miscellaneous -->
|
||||||
<string name="yes">Yes</string>
|
<string name="yes">Yes</string>
|
||||||
|
|
|
@ -155,6 +155,14 @@
|
||||||
android:summary="@string/fast_depth_calculation_descrip"
|
android:summary="@string/fast_depth_calculation_descrip"
|
||||||
android:title="@string/fast_depth_calculation"/>
|
android:title="@string/fast_depth_calculation"/>
|
||||||
|
|
||||||
|
<ListPreference
|
||||||
|
android:defaultValue="0"
|
||||||
|
android:entries="@array/aspectRatioEntries"
|
||||||
|
android:entryValues="@array/aspectRatioValues"
|
||||||
|
android:key="aspectRatio"
|
||||||
|
android:summary="@string/aspect_ratio_descrip"
|
||||||
|
android:title="@string/aspect_ratio"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,7 @@ public final class UserPreferences
|
||||||
|
|
||||||
editor.putBoolean("disableDestinationAlpha", getConfig("gfx_opengl.ini", "Settings", "DstAlphaPass", "False").equals("True"));
|
editor.putBoolean("disableDestinationAlpha", getConfig("gfx_opengl.ini", "Settings", "DstAlphaPass", "False").equals("True"));
|
||||||
editor.putBoolean("fastDepthCalculation", getConfig("gfx_opengl.ini", "Settings", "FastDepthCalc", "True").equals("True"));
|
editor.putBoolean("fastDepthCalculation", getConfig("gfx_opengl.ini", "Settings", "FastDepthCalc", "True").equals("True"));
|
||||||
|
editor.putString("aspectRatio", getConfig("gfx_opengl.ini", "Settings", "AspectRatio", "0"));
|
||||||
|
|
||||||
// Apply the changes.
|
// Apply the changes.
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
@ -162,6 +163,9 @@ public final class UserPreferences
|
||||||
// Whether or not to use fast depth calculation.
|
// Whether or not to use fast depth calculation.
|
||||||
boolean useFastDepthCalc = prefs.getBoolean("fastDepthCalculation", true);
|
boolean useFastDepthCalc = prefs.getBoolean("fastDepthCalculation", true);
|
||||||
|
|
||||||
|
// Aspect ratio selection
|
||||||
|
String aspectRatio = prefs.getString("aspectRatio", "0");
|
||||||
|
|
||||||
// Internal resolution. Falls back to 1x Native upon error.
|
// Internal resolution. Falls back to 1x Native upon error.
|
||||||
String internalResolution = prefs.getString("internalResolution", "2");
|
String internalResolution = prefs.getString("internalResolution", "2");
|
||||||
|
|
||||||
|
@ -211,6 +215,7 @@ public final class UserPreferences
|
||||||
// Video Hack Settings
|
// Video Hack Settings
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Hacks", "EFBAccessEnable", skipEFBAccess ? "False" : "True");
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Hacks", "EFBAccessEnable", skipEFBAccess ? "False" : "True");
|
||||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Hacks", "EFBEmulateFormatChanges", ignoreFormatChanges ? "True" : "False");
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Hacks", "EFBEmulateFormatChanges", ignoreFormatChanges ? "True" : "False");
|
||||||
|
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "AspectRatio", aspectRatio);
|
||||||
|
|
||||||
// Set EFB Copy Method
|
// Set EFB Copy Method
|
||||||
if (efbCopyMethod.equals("Off"))
|
if (efbCopyMethod.equals("Off"))
|
||||||
|
|
Loading…
Reference in New Issue