From d9efdd4cad80dafb33d4571891382e7fea104d01 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 15 Jul 2024 21:50:53 +0200 Subject: [PATCH] Prevent loading saved games twice in LoadSave window callback (#22305) --- distribution/changelog.txt | 1 + src/openrct2/Game.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 0693b2f346..d33c274d9d 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -7,6 +7,7 @@ - Feature: [OpenMusic#54] Added Progressive ride music style (feat. Approaching Nirvana). - Change: [#22230] The plugin/script engine is now initialised off the main thread. - Change: [#22251] Hide author info in the scenery window unless debug tools are active. +- Fix: [#19210] The load/save window executes the loading code twice, resulting in a slowdown. - Fix: [#22056] Potential crash upon exiting the game. - Fix: [#22208] Cursor may fail to register hits in some cases (original bug). diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 975bdd46fd..b40ae30576 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -616,7 +616,6 @@ static void GameLoadOrQuitNoSavePromptCallback(int32_t result, const utf8* path) GameNotifyMapChange(); GameUnloadScripts(); WindowCloseByClass(WindowClass::EditorObjectSelection); - GetContext()->LoadParkFromFile(path); GameLoadScripts(); GameNotifyMapChanged(); gIsAutosaveLoaded = gIsAutosave;