Merge pull request #1122 from Sonicadvance1/Android-reduce-confusion

Show OpenGL or OpenGL ES on Android depending on what the device supports
This commit is contained in:
Ryan Houdek 2014-09-19 09:21:58 -05:00
commit 0d1c1e9477
4 changed files with 19 additions and 2 deletions

View File

@ -150,6 +150,7 @@
<string name="video_settings">ビデオ</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES</string>
<string name="opengl">OpenGL</string>
<string name="video_backend">ビデオレンダラ</string>
<string name="video_backend_desc">%s</string>
<string name="show_fps">FPSを表示</string>

View File

@ -53,6 +53,16 @@
<item>Software Renderer</item>
<item>OGL</item>
</string-array>
<!-- Video Backend Selection - Supports desktop OpenGL -->
<string-array name="videoBackendEntriesGL" translatable="false">
<item>@string/software_renderer</item>
<item>@string/opengl</item>
</string-array>
<string-array name="videoBackendValuesGL" translatable="false">
<item>Software Renderer</item>
<item>OGL</item>
</string-array>
<!-- Video Backend Selection - No OpenGL ES 3 support -->
<string-array name="videoBackendEntriesNoGLES3" translatable="false">
@ -62,7 +72,6 @@
<item>Software Renderer</item>
</string-array>
<!-- EFB Copy Method Preference -->
<string-array name="efbCopyMethodEntries" translatable="false">
<item>@string/disabled</item>

View File

@ -151,6 +151,7 @@
<string name="video_settings">Video</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES</string>
<string name="opengl">OpenGL</string>
<string name="video_backend">Video Backend</string>
<string name="video_backend_desc">%s</string>
<string name="show_fps">Show FPS</string>

View File

@ -47,9 +47,15 @@ public final class VideoSettingsFragment extends PreferenceFragment
// Setting valid video backends.
//
final ListPreference videoBackends = (ListPreference) findPreference("gpuPref");
final boolean deviceSupportsGL = eglHelper.supportsOpenGL();
final boolean deviceSupportsGLES3 = eglHelper.supportsGLES3();
if (deviceSupportsGLES3)
if (deviceSupportsGL)
{
videoBackends.setEntries(R.array.videoBackendEntriesGL);
videoBackends.setEntryValues(R.array.videoBackendValuesGL);
}
else if (deviceSupportsGLES3)
{
videoBackends.setEntries(R.array.videoBackendEntriesGLES3);
videoBackends.setEntryValues(R.array.videoBackendValuesGLES3);