From 92d410791e70b3812a451ab73ddb312023ddf2dd Mon Sep 17 00:00:00 2001 From: Ender's Games Date: Sat, 21 Jul 2018 21:18:08 -0400 Subject: [PATCH] Android: do not attempt useless rendering --- .../java/com/reicast/emulator/emu/GLCFactory14.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/GLCFactory14.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/GLCFactory14.java index ae7fc643c..a44d6a911 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/GLCFactory14.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/GLCFactory14.java @@ -95,16 +95,19 @@ public class GLCFactory14 { glAPIToTry = EGL14.EGL_OPENGL_ES2_BIT; } else { renderableType = EGL14.EGL_OPENGL_ES2_BIT; - // If this API does not work, try ES next. - glAPIToTry = EGL14.EGL_OPENGL_ES_API; + // If this API does not work, is a potato. + glAPIToTry = EGL10.EGL_NONE; } + // This EGL config specification is used to specify 2.0 rendering. + // We use a minimum size of 4 bits for red/green/blue, but will + // perform actual matching in chooseConfig() below. configSpec = new int[] { EGL14.EGL_RED_SIZE, 4, EGL14.EGL_GREEN_SIZE, 4, EGL14.EGL_BLUE_SIZE, 4, EGL14.EGL_RENDERABLE_TYPE, renderableType, - EGL14.EGL_DEPTH_SIZE, 24, + EGL14.EGL_DEPTH_SIZE, 16, EGL14.EGL_NONE }; @@ -115,7 +118,7 @@ public class GLCFactory14 { } } - } while (glAPIToTry != EGL14.EGL_OPENGL_ES_API && mValue[0]<=0); + } while (glAPIToTry != EGL10.EGL_NONE && mValue[0]<=0); if (mValue[0]<=0) { throw new IllegalArgumentException("No configs match configSpec");