mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 23:34:37 +01:00
Add console option to set window scale
This commit is contained in:
@@ -530,6 +530,9 @@ static int cc_get(const utf8 **argv, int argc)
|
||||
console_printf("location %d %d", mapCoord.x, mapCoord.y);
|
||||
}
|
||||
}
|
||||
else if (strcmp(argv[0], "window_scale") == 0) {
|
||||
console_printf("window_scale %f", gConfigGeneral.window_scale);
|
||||
}
|
||||
else {
|
||||
console_writeline_warning("Invalid variable.");
|
||||
}
|
||||
@@ -686,6 +689,13 @@ static int cc_set(const utf8 **argv, int argc)
|
||||
console_execute_silent("get location");
|
||||
}
|
||||
}
|
||||
else if (strcmp(argv[0], "window_scale") == 0 && invalidArguments(&invalidArgs, double_valid[0])) {
|
||||
gConfigGeneral.window_scale = clamp((float)double_val[0], 0.1f, 5.0f);
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
platform_trigger_resize();
|
||||
console_execute_silent("get window_scale");
|
||||
}
|
||||
else if (invalidArgs) {
|
||||
console_writeline_error("Invalid arguments.");
|
||||
}
|
||||
@@ -911,7 +921,8 @@ utf8* console_variable_table[] = {
|
||||
"console_small_font",
|
||||
"test_unfinished_tracks",
|
||||
"no_test_crashes",
|
||||
"location"
|
||||
"location",
|
||||
"window_scale"
|
||||
};
|
||||
utf8* console_window_table[] = {
|
||||
"object_selection",
|
||||
|
||||
Reference in New Issue
Block a user