Exit cleanly on Android instead of hard-exiting using exit(0).

This commit is contained in:
Henrik Rydgard committed 2016-02-13 19:57:05 +01:00
1 parent e1ebc12d7f
commit bfa5091c41
2 files changed
+8 -3

No files matched your search

+1 -3
View File
@@ -1119,12 +1119,10 @@ UI::EventReturn MainScreen::OnExit(UI::EventParams &e) {
// However, let's make sure the config was saved, since it may not have been.
g_Config.Save();
// We shouldn't call NativeShutdown here at all, it should be done by the framework.
#ifdef ANDROID
#ifdef ANDROID_NDK_PROFILER
moncleanup();
#endif
exit(0);
#endif
UpdateUIState(UISTATE_EXIT);
@@ -1144,7 +1142,7 @@ void MainScreen::dialogFinished(const Screen *dialog, DialogResult result) {
// Refocus the game button itself.
int tab = tabHolder_->GetCurrentTab();
if (tab >= 0 && tab < gameBrowsers_.size()) {
if (tab >= 0 && tab < (int)gameBrowsers_.size()) {
gameBrowsers_[tab]->FocusGame(restoreFocusGamePath_);
}