func toggleFullscreen(window *sdl.Window) { isFullscreen := (window.GetFlags() & sdl.WINDOW_FULLSCREEN) != 0 if isFullscreen { window.SetFullscreen(0) } else { window.SetFullscreen(sdl.WINDOW_FULLSCREEN_DESKTOP) } }