Codechange: Don't keep autosave_interval in std::chrono::minutes.
This variable is saved as a setting which requires the variable type to be known, but std::chrono::minutes may vary depending on system type. Instead, keep as uint32_t and convert to std::chrono::minutes only when setting the timer.
This commit is contained in:

committed by
Peter Nelson

parent
a29766d6cc
commit
54d45a6047
@@ -1475,7 +1475,7 @@ static IntervalTimer<TimerGameRealtime> _autosave_interval({std::chrono::millise
|
||||
*/
|
||||
void ChangeAutosaveFrequency(bool reset)
|
||||
{
|
||||
_autosave_interval.SetInterval({_settings_client.gui.autosave_interval, TimerGameRealtime::AUTOSAVE}, reset);
|
||||
_autosave_interval.SetInterval({std::chrono::minutes(_settings_client.gui.autosave_interval), TimerGameRealtime::AUTOSAVE}, reset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user