Close #23018: Close windows before loading new game

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

No files matched your search

+1
View File
@@ -9,6 +9,7 @@
- Fix: [#22962] Fuzzy horizontal-to-vertical line transitions in charts.
- Fix: [#23009] Scenarios from RCT Classic (.sea files) are not included in the scenario index.
- Fix: [#23015] Crash when loading a save game when the construction window is still open.
- Fix: [#23018] Crash when loading a new game when the construction window is still open.
- Fix: [#23023] Large scenery clearance height interpreted as negative when greater than 127.
- Fix: [#23044] "remove_unused_objects" command causes blank peep names.
+5 -1
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();