1
\$\begingroup\$

I'm working on a small game in Gamemaker: Studio 2 in which the user can press F11 to toggle fullscreen. In the "Key Press - F11 Event, I've added the following code:

if window_get_fullscreen()
{
    window_set_fullscreen(false);
}
else
{
    window_set_fullscreen(true);
}

This code works fine to toggle fullscreen two or three times, but after a few toggles the entire screen goes gray. I have attempted multiple times to use CTRL+ALT+DEL to close the game window, but nothing happens once the screen has gone gray. Is there something that I am doing wrong? I've checked the documentation on fullscreening and it has the exact same code as I have.

\$\endgroup\$
1
  • \$\begingroup\$ Something else I've discovered: this issue occurs only when I use one monitor. If I use two monitors with one extended display, there is no issue. \$\endgroup\$
    – Brady Hege
    Commented Jun 13, 2021 at 13:41

0

You must log in to answer this question.

Browse other questions tagged .