mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-06 04:33:49 +01:00
Attempt to address some auto-reported crashes on Android
Still confused about the SignalSema/WaitSema ones.. they are still getting reported at high frequency
This commit is contained in:
1 parent
a0cff13efa
commit
ee4261cf5c
3 files changed
+11
-5
No files matched your search
@@ -360,6 +360,12 @@ public class NativeActivity extends Activity {
|
||||
if (Build.MANUFACTURER == "OUYA") {
|
||||
mGLSurfaceView.getHolder().setFormat(PixelFormat.RGBX_8888);
|
||||
mGLSurfaceView.setEGLConfigChooser(new NativeEGLConfigChooser());
|
||||
} else {
|
||||
// Many devices require that we set a config chooser, despite the documentation
|
||||
// explicitly stating: "If no setEGLConfigChooser method is called, then by default the view will choose an RGB_888 surface with a depth buffer depth of at least 16 bits."
|
||||
// On these devices, I get these crashes: http://stackoverflow.com/questions/14167319/android-opengl-demo-no-config-chosen
|
||||
// So let's try it...
|
||||
mGLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 8);
|
||||
}
|
||||
|
||||
mGLSurfaceView.setRenderer(nativeRenderer);
|
||||
|
||||
@@ -144,7 +144,7 @@ public class NativeEGLConfigChooser implements EGLConfigChooser {
|
||||
}
|
||||
|
||||
if (chosen == null) {
|
||||
// Third, accept one with alpha but with stencil.
|
||||
// Third, accept one with alpha but with stencil, 24-bit depth.
|
||||
for (int i = 0; i < configs.length; i++) {
|
||||
ConfigAttribs c = configs[i];
|
||||
if (c.red == 8 && c.green == 8 && c.blue == 8 && c.alpha == 8 && c.stencil >= 8 && c.depth >= 24) {
|
||||
@@ -155,7 +155,7 @@ public class NativeEGLConfigChooser implements EGLConfigChooser {
|
||||
}
|
||||
|
||||
if (chosen == null) {
|
||||
// Third, accept one with alpha but with stencil.
|
||||
// Third, accept one with alpha but with stencil, 16-bit depth.
|
||||
for (int i = 0; i < configs.length; i++) {
|
||||
ConfigAttribs c = configs[i];
|
||||
if (c.red == 8 && c.green == 8 && c.blue == 8 && c.alpha == 8 && c.stencil >= 8 && c.depth >= 16) {
|
||||
|
||||
Reference in new issue
Block a user