ソースを参照

Reapply e1f6ce34f0c75c4c5a268d15f4ec12400734ee2c

https://github.com/love2d/love-android/issues/200#issuecomment-757976093
Miku AuahDark 5 年 前
親
コミット
ac3ce6af68

+ 6 - 0
love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

@@ -267,6 +267,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();
 
@@ -316,6 +318,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
                 SDLActivity.onNativeDropFile(filename);
             }
         }
+
+        if (hadSDLThread) {
+            resumeNativeThread();
+        }
     }
     // love2d-mod-end: allow restarting of the native thread