Potentially fixes black screen when reopening LOVE from app drawer (restarting)

Issue love2d/love-android#190
This commit is contained in:
Miku AuahDark
2020-10-06 22:27:46 +08:00
parent 98c2df2f52
commit e1f6ce34f0
@@ -243,6 +243,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
// love2d-mod-start: allow restarting of the native thread
public void startNative() {
boolean hadSDLThread = SDLActivity.mSDLThread != null;
// Set up JNI
SDL.setupJNI();
@@ -283,6 +285,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
SDLActivity.onNativeDropFile(filename);
}
}
if (hadSDLThread) {
resumeNativeThread();
}
}
// love2d-mod-end: allow restarting of the native thread