Fix #14256, dfd9fbf873: Company finance windows not updated when paused. (#14258)

Refresh company finance windows via a WindowTimer instead of in game loop.

As the invalidation affects multiple windows this is a global timer instead of window-specific.
This commit is contained in:
Peter Nelson
2025-05-13 01:23:27 +01:00
committed by GitHub
parent bc778545b3
commit 156f98ba06
3 changed files with 4 additions and 7 deletions

View File

@@ -1244,7 +1244,6 @@ void StateGameLoop()
CallWindowGameTickEvent();
NewsLoop();
InvalidateCompanyWindows();
} else {
if (_debug_desync_level > 2 && TimerGameEconomy::date_fract == 0 && (TimerGameEconomy::date.base() & 0x1F) == 0) {
/* Save the desync savegame if needed. */
@@ -1281,7 +1280,6 @@ void StateGameLoop()
CallWindowGameTickEvent();
NewsLoop();
InvalidateCompanyWindows();
cur_company.Restore();
}