T
ThatGuyMiniB
Guest
I have been trying to figure out scaling for desktop and I can't seem to figure it out. I always seem to get black bars. I have looked at pixelated popes videos but again can't figure it out. I am using gamemaker 2
[/IMG]
[/IMG]
Code:
if(os_type == os_windows){
ideal_width = 1920;
ideal_height = 0;
start_b_width = display_get_width();
start_b_height = display_get_height();
aspect_ratio = display_get_width()/display_get_height();
ideal_height = round(ideal_width / aspect_ratio);
if(ideal_height & 1){
ideal_height++;
}
room_set_width(room0, ideal_width);
room_set_height(room0, ideal_height);
room_goto_next();
surface_resize(application_surface, ideal_width, ideal_height);
}[/SPOILER]
Code:
if(display_get_width() != start_b_width || display_get_height() != start_b_height){
aspect_ratio = display_get_width()/ display_get_height();
ideal_height = round(ideal_width / aspect_ratio);
if(ideal_height & 1){
ideal_height++;
}
room_set_width(room0, ideal_width);
room_set_height(room0, ideal_height);
room_goto_next();
surface_resize(application_surface, ideal_width, ideal_height);
start_b_width = display_get_width();
start_b_height = display_get_height();
}