From 015c314fb18fe002b74a161a75c3e71e296117e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 19 Dec 2018 23:05:24 +0100 Subject: [PATCH] Android EGL config: Always require 8888, stencil if version >= ICS --- android/src/org/ppsspp/ppsspp/NativeActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android/src/org/ppsspp/ppsspp/NativeActivity.java b/android/src/org/ppsspp/ppsspp/NativeActivity.java index da7278c71d..2e1815bfe5 100644 --- a/android/src/org/ppsspp/ppsspp/NativeActivity.java +++ b/android/src/org/ppsspp/ppsspp/NativeActivity.java @@ -517,8 +517,13 @@ public abstract class NativeActivity extends Activity implements SurfaceHolder.C if (Build.MANUFACTURER == "OUYA") { mGLSurfaceView.getHolder().setFormat(PixelFormat.RGBX_8888); mGLSurfaceView.setEGLConfigChooser(new NativeEGLConfigChooser()); + } else { + // Tried to mess around with config choosers (NativeEGLConfigChooser) here but fail completely on Xperia Play. + // On the other hand, I think from ICS we should be safe to at least require 8888 and stencil... + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { + mGLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 8); + } } - // Tried to mess around with config choosers here but fail completely on Xperia Play. mGLSurfaceView.setRenderer(nativeRenderer); setContentView(mGLSurfaceView); } else {