From 95d4dc92c1fecb18fd07cac2e1bd486bb608e532 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 11 Jul 2013 11:21:24 -0500 Subject: [PATCH] [Android] Show the OpenGL ES 3 backend video option only on devices that support it. --- Source/Android/.idea/workspace.xml | 106 ++++++-------- Source/Android/res/layout/prefs.xml | 3 +- .../dolphinemu/dolphinemu/PrefsActivity.java | 134 ++++++++++++++++++ 3 files changed, 182 insertions(+), 61 deletions(-) diff --git a/Source/Android/.idea/workspace.xml b/Source/Android/.idea/workspace.xml index 1272e30c4c..4306ba1d4c 100644 --- a/Source/Android/.idea/workspace.xml +++ b/Source/Android/.idea/workspace.xml @@ -118,37 +118,21 @@ - - - - - - - - - - - - - - - - - - - + - - + + + + - + - + @@ -169,7 +153,7 @@ - + @@ -178,7 +162,7 @@ - + @@ -220,8 +204,8 @@ @@ -781,13 +765,6 @@ - - - - - - - @@ -816,13 +793,6 @@ - - - - - - - @@ -830,13 +800,6 @@ - - - - - - - @@ -844,6 +807,20 @@ + + + + + + + + + + + + + + @@ -851,30 +828,39 @@ + + + + + + + + + + - + + + + + + + + - - + + + + - - - - - - - - - - diff --git a/Source/Android/res/layout/prefs.xml b/Source/Android/res/layout/prefs.xml index f98512d087..34700f56b7 100644 --- a/Source/Android/res/layout/prefs.xml +++ b/Source/Android/res/layout/prefs.xml @@ -12,7 +12,8 @@ + android:title="Video Settings" + android:key="videoprefcat"> = 14.0f) + mSupportsGLES3 = true; + } + } + + if (!mSupportsGLES3) + { + mCategory = (PreferenceCategory) findPreference("videoprefcat"); + ListPreference mPref = (ListPreference) findPreference("gpupref"); + mCategory.removePreference(mPref); + + final ListPreference videobackend = new ListPreference(m_activity); + + _entries = new CharSequence[] { + "Software Renderer", + }; + _entryvalues = new CharSequence[] {"Software Renderer"}; + + videobackend.setKey("gpupref"); + videobackend.setTitle("Video Backend"); + videobackend.setSummary("Video backend to use"); + + videobackend.setEntries(_entries); + videobackend.setEntryValues(_entryvalues); + + mCategory.addPreference(videobackend); + } } }