From f9c794efeea506f8ec6398c34b150afd957811a9 Mon Sep 17 00:00:00 2001 From: elasota Date: Sun, 25 Oct 2020 00:47:46 -0400 Subject: [PATCH] Fix crash when ending game on mobile --- GpApp/MainMenuUI.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/GpApp/MainMenuUI.cpp b/GpApp/MainMenuUI.cpp index 46d366d..67b7172 100644 --- a/GpApp/MainMenuUI.cpp +++ b/GpApp/MainMenuUI.cpp @@ -341,7 +341,7 @@ void HandleMainMenuUIResolutionChange() wm->PutWindowBehind(control.m_window, wm->GetPutInFrontSentinel()); } - } + } } static void MainMenuUIMouseMove(Window *window, MainMenuUIState::ControlID controlID, const Point &localPoint) @@ -371,6 +371,7 @@ static void HandleMainMenuUISelection(MainMenuUIState::ControlID controlID) case MainMenuUIState::Control_NewGame: DismissMainMenuUIPage(); DoGameMenu(iNewGame); + StartMainMenuUI(); break; case MainMenuUIState::Control_LoadSavedGame: @@ -459,7 +460,7 @@ bool HandleMainMenuUIClick(Window *window, const Point &pt) for (;;) { - TimeTaggedVOSEvent evt; + TimeTaggedVOSEvent evt; if (WaitForEvent(&evt, 1)) { if (evt.m_vosEvent.m_eventType == GpVOSEventTypes::kMouseInput) @@ -484,8 +485,8 @@ bool HandleMainMenuUIClick(Window *window, const Point &pt) return true; } } - } + } } - return true; + return true; }