mirror of
https://github.com/love2d/love-android.git
synced 2026-08-12 08:31:04 +02:00
fixed crash due to orientation change or call of onDestroy()
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
|
||||
<activity android:name="GameActivity"
|
||||
android:label="Löve for Android"
|
||||
android:screenOrientation="landscape">
|
||||
android:screenOrientation="unspecified">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
@@ -109,6 +109,12 @@ public class SDLActivity extends Activity {
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
Log.v("SDL", "onDestroy()");
|
||||
|
||||
if (!isFinishing()) {
|
||||
Log.v("SDL", "Not quitting native app as isFinishing() is false");
|
||||
return;
|
||||
}
|
||||
|
||||
// Send a quit message to the application
|
||||
SDLActivity.nativeQuit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user