1
0
Fork 0

Fix #13749: Apply callback when automatically changing timekeeping unit (#13751)

pull/13791/head
Loïc Guilloux 2025-03-10 14:55:19 +01:00 committed by GitHub
parent 5721030bd2
commit 59904e5f9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -658,8 +658,10 @@ static void ChangeMinutesPerYear(int32_t new_value)
* This can only happen in the menu, since the pre_cb ensures this setting can only be changed there, or if we're already using wallclock units.
*/
if (_game_mode == GM_MENU && (_settings_newgame.economy.minutes_per_calendar_year != CalendarTime::DEF_MINUTES_PER_YEAR)) {
_settings_newgame.economy.timekeeping_units = TKU_WALLCLOCK;
InvalidateWindowClassesData(WC_GAME_OPTIONS, 0);
if (_settings_newgame.economy.timekeeping_units != TKU_WALLCLOCK) {
_settings_newgame.economy.timekeeping_units = TKU_WALLCLOCK;
ChangeTimekeepingUnits(TKU_WALLCLOCK);
}
}
}