[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 2013-10-06 21:31:47 -05:00
parent d4bd5fde71
commit a40daac5b1
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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;
}