Close windows before loading another save

This commit is contained in:
Michael Steenbeek 2024-10-18 09:14:50 +02:00 committed by GitHub
parent 236f4afbd7
commit 0d6ed8efc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -7,6 +7,7 @@
- Fix: [#22921] Wooden RollerCoaster flat to steep railings appear in front of track in front of them.
- 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.
0.4.15 (2024-10-06)
------------------------------------------------------------------------

View file

@ -267,6 +267,11 @@ namespace OpenRCT2::Ui::Windows
char pathBuffer[MAX_PATH];
SafeStrCpy(pathBuffer, path, sizeof(pathBuffer));
// 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);
auto& gameState = GetGameState();
switch (_type & 0x0F)