M
MsTopHat
Guest
I've been messing with GMS2 for a while now and I noticed something was a little off compared to when I used gms1. When I entered fullscreen in GMS1 using my display coding it would display the image in the center of the screen then draw black bars around the window where necessary.
In GMS2 whenever I set the game to full screen it always places the game window in the top left corner of the screen and draws the black bars on the bottom and the right of the screen. I know GMS2 changed some things when it came to view_ports and what not, and I'm not sure if that is causing the issue.
I've tried using code to center the display while in fullscreen but nothing ends up happening.
If anyone has any solutions, or ideas of what might be happening it would be much appreciated!
In GMS2 whenever I set the game to full screen it always places the game window in the top left corner of the screen and draws the black bars on the bottom and the right of the screen. I know GMS2 changed some things when it came to view_ports and what not, and I'm not sure if that is causing the issue.
I've tried using code to center the display while in fullscreen but nothing ends up happening.
Code:
/// @description initialize the display
// You can write your code in this editor
game_running_width = 480; //the default settings that my game initializes in
game_running_height = 270;
var screen_max_width = display_get_width() //get the max size of the monitor the user is using
var screen_max_height = display_get_height()
ideal_width = 1920 //testing; my monitor is 1920x1200
ideal_height = 1080 //testing
wy = window_get_y();
var grw = game_running_width;
var grh = game_running_height;
var iw = ideal_width
var ih = ideal_height
aspect_ratio = display_get_width()/display_get_height();
//create the camera. The camera follows obj_default_view
global.camera = camera_create_view(0,0, grw, grh, 0, obj_default_view, -3, -3, 140, 140);
var cc = global.camera //camera variable
for(var i = 1; i<=room_last; i++) {
if room_exists(i) {
room_set_camera(i, 0, cc);
room_set_view_enabled(i, true);
room_set_viewport(i,0,true,0,0,iw, ih);
}
}
surface_resize(application_surface, ideal_width, ideal_height);
window_set_size(ideal_width, ideal_height);
//window_set_fullscreen(true);
alarm[0] = 1;
room_goto_next();
If anyone has any solutions, or ideas of what might be happening it would be much appreciated!