summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2013-08-13 09:48:18 -0400
committerLioncash <mathew1800@gmail.com>2013-08-13 09:48:18 -0400
commitdebd5b42cf9ca56a33d76f19b1f6b586f0de697c (patch)
treeb308a45fab6102991512b60dfd76985f9c8434cf /Source
parent2015484c24b817b9980d0f59e0cde1a4435cc789 (diff)
[Android] Clean up function SupportsGLES3 in PrefsFragment.java a little bit.
Diffstat (limited to 'Source')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java24
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java
index e56aeeb479..4f088a58b4 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java
@@ -97,33 +97,35 @@ public class PrefsFragment extends PreferenceFragment {
}
static public boolean SupportsGLES3()
{
- String m_GLVersion;
- String m_GLVendor;
- String m_GLRenderer;
-
VersionCheck mbuffer = new VersionCheck();
- m_GLVersion = mbuffer.getVersion();
- m_GLVendor = mbuffer.getVendor();
- m_GLRenderer = mbuffer.getRenderer();
+ String m_GLVersion = mbuffer.getVersion();
+ String m_GLVendor = mbuffer.getVendor();
+ String m_GLRenderer = mbuffer.getRenderer();
boolean mSupportsGLES3 = false;
- if (m_GLVersion.contains("OpenGL ES 3.0") ||
- m_GLVersion.equals("OpenGL ES 3.0")) // 3.0 support
+ // Check for OpenGL ES 3 support (General case).
+ if (m_GLVersion.contains("OpenGL ES 3.0") || m_GLVersion.equals("OpenGL ES 3.0"))
mSupportsGLES3 = true;
+
+ // Checking for OpenGL ES 3 support for certain Qualcomm devices.
if (!mSupportsGLES3 && m_GLVendor.equals("Qualcomm"))
{
if (m_GLRenderer.contains("Adreno (TM) 3"))
{
- int mVStart, mVEnd = 0;
+ int mVStart = m_GLVersion.indexOf("V@") + 2;
+ int mVEnd = 0;
float mVersion;
- mVStart = m_GLVersion.indexOf("V@") + 2;
+
for (int a = mVStart; a < m_GLVersion.length(); ++a)
+ {
if (m_GLVersion.charAt(a) == ' ')
{
mVEnd = a;
break;
}
+ }
+
mVersion = Float.parseFloat(m_GLVersion.substring(mVStart, mVEnd));
if (mVersion >= 14.0f)