mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
@@ -544,6 +544,15 @@ bool config_open(const utf8string path)
|
||||
|
||||
free(lineBuffer);
|
||||
SDL_RWclose(file);
|
||||
|
||||
// Window limit must be kept within valid range.
|
||||
if (gConfigGeneral.window_limit < WINDOW_LIMIT_MIN) {
|
||||
gConfigGeneral.window_limit = WINDOW_LIMIT_MIN;
|
||||
}
|
||||
else if (gConfigGeneral.window_limit > WINDOW_LIMIT_MAX) {
|
||||
gConfigGeneral.window_limit = WINDOW_LIMIT_MAX;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ static void window_close_surplus(sint32 cap, sint8 avoid_classification)
|
||||
void window_set_window_limit(sint32 value)
|
||||
{
|
||||
sint32 prev = gConfigGeneral.window_limit;
|
||||
sint32 val = clamp(value, WINDOW_LIMIT_MIN, WINDOW_LIMIT_MAX);
|
||||
sint32 val = clamp(WINDOW_LIMIT_MIN, value, WINDOW_LIMIT_MAX);
|
||||
gConfigGeneral.window_limit = val;
|
||||
config_save_default();
|
||||
// Checks if value decreases and then closes surplus
|
||||
|
||||
Reference in New Issue
Block a user