Merge pull request #15118 from hrydgard/disable-opengl-fallback-android-11

On Android 11 and later, let's not fallback to OpenGL on init crashes.
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2021-11-10 08:48:34 +01:00
commit 80933ac4cb
1 file changed
+9
+9
View File
@@ -389,6 +389,15 @@ static void CheckFailedGPUBackends() {
return;
#endif
#if PPSSPP_PLATFORM(ANDROID)
if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 30) {
// In Android 11 or later, Vulkan is as stable as OpenGL, so let's not even bother.
// Have also seen unexplained issues with random fallbacks to OpenGL for no good reason,
// especially when debugging.
return;
}
#endif
// We only want to do this once per process run and backend, to detect process crashes.
// If NativeShutdown is called before we finish, we might call this multiple times.
static int lastBackend = -1;