mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-25 16:41:04 +00:00
Try a silly workaround for an otherwise unexplainable crash seen in Google Play Console
This commit is contained in:
parent
8a0645859e
commit
5fbbb3e115
@ -651,6 +651,17 @@ public abstract class NativeActivity extends Activity implements SurfaceHolder.C
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (javaGL) {
|
||||
if (nativeRenderer.isRenderingFrame()) {
|
||||
Log.i(TAG, "Waiting for renderer to finish.");
|
||||
int tries = 200;
|
||||
do {
|
||||
try {
|
||||
Thread.sleep(10);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
tries--;
|
||||
} while (nativeRenderer.isRenderingFrame() && tries > 0);
|
||||
}
|
||||
Log.i(TAG, "onDestroy");
|
||||
mGLSurfaceView.onDestroy();
|
||||
// Probably vain attempt to help the garbage collector...
|
||||
|
@ -32,7 +32,6 @@ public class NativeApp {
|
||||
public static native void pause();
|
||||
public static native void resume();
|
||||
|
||||
// There's not really any reason to ever call shutdown as we can recover from a killed activity.
|
||||
public static native void shutdown();
|
||||
|
||||
public static native boolean keyDown(int deviceId, int key, boolean isRepeat);
|
||||
|
@ -13,13 +13,20 @@ import android.view.Display;
|
||||
public class NativeRenderer implements GLSurfaceView.Renderer {
|
||||
private static String TAG = "NativeRenderer";
|
||||
private NativeActivity mActivity;
|
||||
private boolean inFrame;
|
||||
|
||||
NativeRenderer(NativeActivity act) {
|
||||
mActivity = act;
|
||||
}
|
||||
|
||||
public boolean isRenderingFrame() {
|
||||
return inFrame;
|
||||
}
|
||||
|
||||
public void onDrawFrame(GL10 unused /*use GLES20*/) {
|
||||
inFrame = true;
|
||||
displayRender();
|
||||
inFrame = false;
|
||||
}
|
||||
|
||||
public void onSurfaceCreated(GL10 unused, EGLConfig config) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "VulkanQueueRunner.h"
|
||||
#include "VulkanRenderManager.h"
|
||||
|
||||
// Debug help: adb logcat -s DEBUG PPSSPPNativeActivity PPSSPP
|
||||
// Debug help: adb logcat -s DEBUG PPSSPPNativeActivity PPSSPP NativeGLView NativeRenderer NativeSurfaceView PowerSaveModeReceiver InputDeviceState
|
||||
|
||||
void VulkanQueueRunner::CreateDeviceObjects() {
|
||||
ILOG("VulkanQueueRunner::CreateDeviceObjects");
|
||||
|
Loading…
x
Reference in New Issue
Block a user