/// @param scale

var _scale = argument[0];

global.win_scale = _scale;

var _win_size = [WIN_WIDTH * _scale, WIN_HEIGHT * _scale];
window_set_size(_win_size[vec2_x], _win_size[vec2_y]);
alarm[4] = 1; // window_center

/*var _win_size_prev = [WIN_WIDTH * global.win_scale, WIN_HEIGHT * global.win_scale];

var _win_size = [WIN_WIDTH * _scale, WIN_HEIGHT * _scale];

show_debug_message(_win_size);

/// Center the window relative to the size

var _new_pos = [window_get_x() + (_win_size_prev[vec2_x] - _win_size[vec2_x]) / 2, 
	window_get_y() + (_win_size_prev[vec2_y] - _win_size[vec2_y]) / 2];

window_set_size(_win_size[vec2_x], _win_size[vec2_y]);

var _max_x = display_get_width() - _win_size[vec2_x];
var _max_y = display_get_height() - _win_size[vec2_y];

window_set_position(clamp(_new_pos[vec2_x], 100, _max_x-100), clamp(_new_pos[vec2_y], 100, _max_y-100));
//window_set_position(_new_pos[vec2_x], _new_pos[vec2_y]);*/