[Android] Fix an issue where emulation would crash if we couldn't retrieve GPU information. Also if we can't get the graphics information, give them the benefit of the doubt and enable the GLES3 option.

This commit is contained in:
Ryan Houdek committed 2013-10-06 21:32:05 -05:00
1 parent d4bd5fde71
commit a40daac5b1
2 files changed
+9

No files matched your search

@@ -72,6 +72,7 @@ public final class EmulationActivity extends Activity
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (prefs.getString("gpuPref", "Software Rendering").equals("OGL")
&& VideoSettingsFragment.SupportsGLES3()
&& VideoSettingsFragment.m_GLVendor != null
&& VideoSettingsFragment.m_GLVendor.equals("Qualcomm"))
NativeLibrary.SetDimensions((int)screenHeight, (int)screenWidth);
else
@@ -190,6 +190,14 @@ public final class VideoSettingsFragment extends PreferenceFragment
// Is a Tegra 4 since it supports 24bit depth
mSupportsGLES3 = true;
}
if (!mSupportsGLES3 &&
m_GLVendor == null &&
m_GLRenderer == null &&
m_GLExtensions == null)
{
// Couldn't get information. Give them the benefit of the doubt
mSupportsGLES3 = true;
}
return mSupportsGLES3;
}