Request closing the app on android in better place, so that it handles both - quit button and escape pressed.

This commit is contained in:
Deve 2016-12-31 02:24:17 +01:00
parent dbe148baf6
commit cec7c51bc0
2 changed files with 4 additions and 4 deletions

View File

@ -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")

View File

@ -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
// ============================================================================