Request closing the app on android in better place, so that it handles both - quit button and escape pressed.
This commit is contained in:
parent
dbe148baf6
commit
cec7c51bc0
@ -407,11 +407,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
}
|
||||
else if (selection == "quit")
|
||||
{
|
||||
#ifdef ANDROID
|
||||
ANativeActivity_finish(global_android_app->activity);
|
||||
#else
|
||||
StateManager::get()->popMenu();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
else if (selection == "about")
|
||||
|
@ -240,9 +240,13 @@ void StateManager::onTopMostScreenChanged()
|
||||
|
||||
void StateManager::onStackEmptied()
|
||||
{
|
||||
#ifdef ANDROID
|
||||
ANativeActivity_finish(global_android_app->activity);
|
||||
#else
|
||||
GUIEngine::cleanUp();
|
||||
GUIEngine::deallocate();
|
||||
main_loop->abort();
|
||||
#endif
|
||||
} // onStackEmptied
|
||||
|
||||
// ============================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user