fixed crash due to orientation change or call of onDestroy()

This commit is contained in:
Martin Felis
2013-12-29 01:19:09 +01:00
parent f58dcdf03a
commit eaf4e6d8b2
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -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" />
+6
View File
@@ -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();