T
Trex0n35
Guest
So I have a bit of code that resizes the scale of the GUI for fullscreen but whenever my game is minimized it comes up with an error because it cant get the width and height of the GUI.
If anyone can figure out how I can prevent this error, that would be great!!!
############################################################################################
ERROR in
action number 1
of Draw Event
for object ob_control:
Invalid surface dimensions
at gml_Object_ob_control_Draw_74
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_ob_control_Draw_74 (line -1)
Code:
if _fullscreen {
window_set_fullscreen(true)
display_set_gui_size(display_get_gui_width(),display_get_gui_height())
surface_resize(application_surface,display_get_gui_width(),display_get_gui_height())
} else {
window_set_fullscreen(false)
display_set_gui_size(window_get_width(),window_get_height())
surface_resize(application_surface,window_get_width(),window_get_height())
}
############################################################################################
ERROR in
action number 1
of Draw Event
for object ob_control:
Invalid surface dimensions
at gml_Object_ob_control_Draw_74
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_ob_control_Draw_74 (line -1)
Last edited by a moderator: