/// @description

if (global.scale == 0) {
	window_set_fullscreen(false);
}

++global.scale;

if (global.scale > global.maxScale) {
	global.scale = 0;
}

if (global.scale == 0) {
	window_set_fullscreen(true);
} else {
	window_set_size(256 * global.scale, 240 * global.scale);
	alarm[0] = 1;
}

ini_open(FILE_CONFIG);
ini_write_real("SYSTEM", "window_size", global.scale);
ini_close();