Zahk
Member
So I've had this code in my game for a while - haven't changed it at all - but today I decided to change the resolution in my game's options menu and discovered that it appears to be broken suddenly. Here's what happens:
I swap the game from fullscreen to a lower resolution (in this case, 160x144), but instead of simply leaving fullscreen and shrinking the window down, it shrinks to a distorted resolution in a borderless window, then begins repeatedly flashing white while gradually expanding horizontally over a span of about 5 seconds, until finally it stretches out and becomes an unnecessarily wide, bordered window in an incorrect (fullscreen-sized) resolution. (edit: I just discovered that the window it's stretching to is exactly the length of both of my monitors combined... I don't know what that means, or how to fix it).
This ONLY happens if the game was previously set to fullscreen. If I don't set it to fullscreen first, then it correctly changes to the appropriate resolutions.
Here is my current code for changing from fullscreen to the minimum resolution:
My project searches didn't turn up any other code that could be messing with the window's size at all. Did one of gamemaker's updates bust some of these functions? Or could I be missing something here? It worked fine when I implemented it, and haven't messed with resolutions at all since then.
I swap the game from fullscreen to a lower resolution (in this case, 160x144), but instead of simply leaving fullscreen and shrinking the window down, it shrinks to a distorted resolution in a borderless window, then begins repeatedly flashing white while gradually expanding horizontally over a span of about 5 seconds, until finally it stretches out and becomes an unnecessarily wide, bordered window in an incorrect (fullscreen-sized) resolution. (edit: I just discovered that the window it's stretching to is exactly the length of both of my monitors combined... I don't know what that means, or how to fix it).
This ONLY happens if the game was previously set to fullscreen. If I don't set it to fullscreen first, then it correctly changes to the appropriate resolutions.
Here is my current code for changing from fullscreen to the minimum resolution:
GML:
window_set_fullscreen(false);
display_set_gui_size(160, 144);
window_set_size(160, 144);
Last edited: