GameMaker [SOLVED] Game Not Scaling Correctly When in Fullscreen

I have a game where it's camera size is 640x360 and the viewport is 1280x720 and when the game is run in Windowed Mode, it displays fine (no pixel distortion). But, when I set it to full screen, (using a 1080p monitor) the pixels get stretched (even though it shows black bars and I have it set to keep aspect ratio).

How can I fix this so the black bars appear to keep it's aspect ratio? Here's the code I have in the o_camera Object:

GML:
// Create Code

/// @description Camera

target_ = Auto_Scroll;
width_ = camera_get_view_width(view_camera[0]);
height_ = camera_get_view_height(view_camera[0]);

// Begin Step

if instance_exists(target_) {
    x = target_.x;
    y = target_.y;
}

// End Step

if !instance_exists(target_) exit;
x = lerp(x, target_.x, 0.1);
y = lerp(y, target_.y, 0.1);
x = round_n(x, 1);
y = round_n(y, 1);
x = clamp(x, width_/2, room_width-width_/2);
y = clamp(y, height_/2, room_height-height_/2);
camera_set_view_pos(view_camera[0], x-width_/2, y-height_/2,);
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Have you tried simply ticking the "Keep Aspect Ratio" option in the Graphics tab of the Game options for the target platform?
 
K

KiD_Rager

Guest
Off the get-go, upscaling usually distorts the quality when going into full screen mode if your game is at a much smaller size.

It's also possible that GM is not keeping the aspect ratio the same when going full screen. There should be a Keep Aspect Ratio thing somewhere in your Options. See if that works.
 
Have you tried simply ticking the "Keep Aspect Ratio" option in the Graphics tab of the Game options for the target platform?
Off the get-go, upscaling usually distorts the quality when going into full screen mode if your game is at a much smaller size.

It's also possible that GM is not keeping the aspect ratio the same when going full screen. There should be a Keep Aspect Ratio thing somewhere in your Options. See if that works.
Thank you for the replies. Yes I have set it to "Keep Aspect Ratio" Here's what I have checked:

screenshot_options.png
Here's the difference between the windowed 720p and the full screen:

screenshot_fullscreen.png
 
I'm a total beginner but I watched a tutorial video on Youtube that may have some insight into the trouble. When upscaling it's possible to get pixel distortion, and the further you are from an integer the worse it is. So for example, if your viewport is scaling from 720 to 1080, that's a ratio of 1.5, basically the worst case scenario for pixel distortion.
 
Top