mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Change autosave system to use wall-clock time based frequencies
The autosave system will now use frequencies based on wall-clock time rather than in-game time, for example every 15 minutes. This frequency is not affected by pausing the game or changing the game speed. The default frequency is every 5 minutes.
This commit is contained in:
@@ -869,10 +869,11 @@ static void window_options_mousedown(int widgetIndex, rct_window*w, rct_widget*
|
||||
case WINDOW_OPTIONS_PAGE_MISC:
|
||||
switch (widgetIndex) {
|
||||
case WIDX_AUTOSAVE_DROPDOWN:
|
||||
for (i = AUTOSAVE_EVERY_WEEK; i <= AUTOSAVE_NEVER; i++) {
|
||||
for (i = AUTOSAVE_EVERY_MINUTE; i <= AUTOSAVE_NEVER; i++) {
|
||||
gDropdownItemsFormat[i] = 1142;
|
||||
gDropdownItemsArgs[i] = 2701 + i;
|
||||
gDropdownItemsArgs[i] = STR_SAVE_EVERY_MINUTE + i;
|
||||
}
|
||||
|
||||
window_options_show_dropdown(w, widget, AUTOSAVE_NEVER + 1);
|
||||
gDropdownItemsChecked = 1 << gConfigGeneral.autosave_frequency;
|
||||
break;
|
||||
@@ -1371,7 +1372,7 @@ static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
gfx_draw_string_left(dpi, 2700, w, w->colours[1], w->x + 10, w->y + window_options_misc_widgets[WIDX_AUTOSAVE].top + 1);
|
||||
gfx_draw_string_left(
|
||||
dpi,
|
||||
2701 + gConfigGeneral.autosave_frequency,
|
||||
STR_SAVE_EVERY_MINUTE + gConfigGeneral.autosave_frequency,
|
||||
NULL,
|
||||
w->colours[1],
|
||||
w->x + window_options_misc_widgets[WIDX_AUTOSAVE].left + 1,
|
||||
|
||||
Reference in New Issue
Block a user