android: now run exit() from Java side, as the next engine run is expected to be clean

This commit is contained in:
Alibek Omarov 2025-01-09 21:29:01 +03:00
parent 90e493fa3a
commit f2fb668c9e

View file

@ -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"};