Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_border_controller_Draw_76

(view raw script w/o annotations or w/e)
1
var ww = window_get_width();
2
var wh = window_get_height();
3
var sw = surface_get_width(application_surface);
4
var sh = surface_get_height(application_surface);
5
var scale_w = ww / sw;
6
var scale_h = wh / sh;
7
if (scr_is_switch_os() || os_type == os_ps4 || os_type == os_ps5)
8
{
9
    if (os_type == os_switch2 && wh == 1440)
10
        global.window_scale = 2.6666666666666665;
11
    else if (scr_is_switch_os() && wh == 720)
12
        global.window_scale = 4/3;
13
    else
14
        global.window_scale = floor(min(scale_w, scale_h));
15
}
16
else
17
{
18
    global.window_scale = min(scale_w, scale_h);
19
}