android: now run exit() from Java side, as the next engine run is expected to be clean
This commit is contained in:
parent
90e493fa3a
commit
f2fb668c9e
1 changed files with 12 additions and 0 deletions
|
@ -30,6 +30,18 @@ public class XashActivity extends SDLActivity {
|
|||
AndroidBug5497Workaround.assistActivity(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy()
|
||||
{
|
||||
super.onDestroy();
|
||||
|
||||
// Now that we don't exit from native code, we need to exit here, resetting
|
||||
// application state (actually global variables that we don't cleanup on exit)
|
||||
//
|
||||
// When the issue with global variables will be resolved, remove that exit() call
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] getLibraries() {
|
||||
return new String[]{"SDL2", "xash"};
|
||||
|
|
Loading…
Add table
Reference in a new issue