Fix crash when ending game on mobile

This commit is contained in:
elasota
2020-10-25 00:47:46 -04:00
parent a774320324
commit f9c794efee

View File

@@ -341,7 +341,7 @@ void HandleMainMenuUIResolutionChange()
wm->PutWindowBehind(control.m_window, wm->GetPutInFrontSentinel()); wm->PutWindowBehind(control.m_window, wm->GetPutInFrontSentinel());
} }
} }
} }
static void MainMenuUIMouseMove(Window *window, MainMenuUIState::ControlID controlID, const Point &localPoint) 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: case MainMenuUIState::Control_NewGame:
DismissMainMenuUIPage(); DismissMainMenuUIPage();
DoGameMenu(iNewGame); DoGameMenu(iNewGame);
StartMainMenuUI();
break; break;
case MainMenuUIState::Control_LoadSavedGame: case MainMenuUIState::Control_LoadSavedGame:
@@ -459,7 +460,7 @@ bool HandleMainMenuUIClick(Window *window, const Point &pt)
for (;;) for (;;)
{ {
TimeTaggedVOSEvent evt; TimeTaggedVOSEvent evt;
if (WaitForEvent(&evt, 1)) if (WaitForEvent(&evt, 1))
{ {
if (evt.m_vosEvent.m_eventType == GpVOSEventTypes::kMouseInput) 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; return true;
} }