Legacy GM [solved]fullscreen toggle issues

P

petra

Guest
I am using this code to toggle between fullscreen mode and windowed mode in the

keypress f4 event:

window_set_fullscreen(!window_get_fullscreen());

however every time I switch to full screen and then returned to windowed, the windowed size isn't consistent. The view is set to 320 by 240. it works in the first room, but the others just stay the size of the screen in windowed mode.
Also when I switch between rooms, the pixels get messed up, and by that I mean every time the player moves, some of the pixels double, and the entire image looks stretched.
 

Bingdom

Googledom
The room settings are different for each room.

When you change to a different room, view_w/h and port_w/h don't get carried over, and are set according to what you have set it as in the room.
 
P

petra

Guest
The room settings are different for each room.

When you change to a different room, view_w/h and port_w/h don't get carried over, and are set according to what you have set it as in the room.
hmm maybe I shouldn't have mentioned that, because the views are fine, I just thought that would have something to do with it. My main issue when toggling between fullscreen and windowed mode, the windows don't stay the same size, and in fullscreen mode, after switching rooms, the pixels look stretched.
 

icuurd12b42

TMC Founder
GMC Elder
if your pixels looks stretched, perhaps not all your rooms have the same port size (if using views) or rooms size (if not using view). The region rendered to the screen as defined by port size or room sized (if not using a view) should be consistent (same dimensions everywhere)...

perhaps you are calling surface_resize... you should have a check in the step event to detect and resize the surface according to the mode you are at...
 
P

petra

Guest
if your pixels looks stretched, perhaps not all your rooms have the same port size (if using views) or rooms size (if not using view). The region rendered to the screen as defined by port size or room sized (if not using a view) should be consistent (same dimensions everywhere)...

perhaps you are calling surface_resize... you should have a check in the step event to detect and resize the surface according to the mode you are at...


The windowed/fullscreen switching is still an issue though. every room in my game has a viewport of 320 by 240

[edit] no nevermind, the stretching issue is still an issue when I cross over to other rooms
 
Last edited by a moderator:
P

petra

Guest
The windowed/fullscreen switching is still an issue though. every room in my game has a viewport of 320 by 240

[edit] no nevermind, the stretching issue is still an issue when I cross over to other rooms
fixed my issue, put all of my coding for it a script, attached it to an object, and placed the object in each room. Thank you guys for setting me on the right track!
 
Top