From 19be093569fa452f1b5ad9eba3d231cec5bfc628 Mon Sep 17 00:00:00 2001 From: Matt <5415177+ZehMatt@users.noreply.github.com> Date: Tue, 13 Feb 2024 21:03:30 +0200 Subject: [PATCH] Fix #21208: Error messages disappear too quickly if the game runs for a while (#21394) * Reset gCurrentRealTimeTicks when the map is initialized * Use 32 bit for gWindowUpdateTicks * Update changelog.txt --- distribution/changelog.txt | 1 + src/openrct2/Game.cpp | 1 + src/openrct2/interface/Window.cpp | 2 +- src/openrct2/interface/Window.h | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 8b788bdb75..ba604395dd 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,6 +4,7 @@ - Improved: [#21356] Resize the title bar when moving between displays with different scaling factors on Windows systems. - Fix: [#18963] Research table in parks from Loopy Landscapes is imported incorrectly. - Fix: [#20907] RCT1/AA scenarios use the 4-across train for the Inverted Roller Coaster. +- Fix: [#21208] Error message will stay open only for a brief moment when the game has been running a while. - Fix: [#21220] When creating a new park from a SC4 file, the localised park name is not applied. - Fix: [#21286] Cannot build unbanking turns with RCT1 vehicles. - Fix: [#21330] Tooltips from dropdown widgets have the wrong position. diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 8da3d83d8c..31a6f6b9ec 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -542,6 +542,7 @@ void GameLoadInit() ContextBroadcastIntent(&intent); gWindowUpdateTicks = 0; + gCurrentRealTimeTicks = 0; LoadPalette(); diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index 01e534b30c..2a2fe94f37 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -49,7 +49,7 @@ int32_t gTextBoxFrameNo = 0; bool gUsingWidgetTextBox = false; TextInputSession* gTextInput; -uint16_t gWindowUpdateTicks; +uint32_t gWindowUpdateTicks; uint16_t gWindowMapFlashingFlags; colour_t gCurrentWindowColours[4]; diff --git a/src/openrct2/interface/Window.h b/src/openrct2/interface/Window.h index 067da8083a..66c4dc08e9 100644 --- a/src/openrct2/interface/Window.h +++ b/src/openrct2/interface/Window.h @@ -480,7 +480,7 @@ using close_callback = void (*)(); extern WindowBase* gWindowAudioExclusive; -extern uint16_t gWindowUpdateTicks; +extern uint32_t gWindowUpdateTicks; namespace MapFlashingFlags { constexpr uint16_t GuestListOpen = (1 << 0);