1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00

Close #23018: Close windows before loading new game

This commit is contained in:
Michael Steenbeek
2024-10-23 20:33:37 +02:00
committed by GitHub
parent 1ff192b8a0
commit f4d2dadfe7
2 changed files with 6 additions and 1 deletions

View File

@@ -622,7 +622,11 @@ static void GameLoadOrQuitNoSavePromptCallback(int32_t result, const utf8* path)
static void NewGameWindowCallback(const utf8* path)
{
WindowCloseByClass(WindowClass::EditorObjectSelection);
// Closing this will cause a Ride window to pop up, so we have to do this to ensure that
// no windows are open (besides the toolbars and LoadSave window).
WindowCloseByClass(WindowClass::RideConstruction);
WindowCloseAllExceptClass(WindowClass::Loadsave);
GameNotifyMapChange();
GetContext()->LoadParkFromFile(path, false, true);
GameLoadScripts();