• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Game crash when turning into full screen mode

  • Thread starter Jean-Christophe
  • Start date
J

Jean-Christophe

Guest
Hello!

I got an issue with full screen mode.

I made an object whit the following step event :

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


When I try the game in windowed and I type F12, the game crashed and I get a Win32 error.

Would any of you know how I could resolve this?

Thank you very much!
 
J

Jean-Christophe

Guest
Here is the detailled error message :

Win32 function failed : HRESULT : 0x8007000e

Call : at line 366 in file /grsphics_displayM.cpp


Thank you!
 

FrostyCat

Redemption Seeker
You should use keyboard_check_pressed() instead of keyboard_check(). It's probably not your intention to make the program toggle fullscreen 30 or 60 times a second, and it's definitely not something that your system should be made to handle.
 
J

Jean-Christophe

Guest
Thank you very much for your answer!

My bad on the code, I changed it for keyboard_check_pressed(). This resolved the crashing issue, but the game still doesn't get in fullscreen. In fact when I press F12 the game window get centered and nothing happens.

Do you have a clue on this issue?

Thank you so much!
 
B

bilouw

Guest
Do you have check these settings in the project options : "Allow fullscreen switching"? If it still doesn't work, try to check also the option "Allow window resize".
 
J

Jean-Christophe

Guest
Hello! Thank you for your answer.

I have both "Allow fullscreen switching" and "Allow window resize" switched on.

I have been looking all over my code if I see somethign that couldn't allow the fullscreen mode but couldn't find anything. =(
 
Top