diff --git a/src/framework/backend_glutin.rs b/src/framework/backend_glutin.rs index def7734..de629ae 100644 --- a/src/framework/backend_glutin.rs +++ b/src/framework/backend_glutin.rs @@ -323,6 +323,17 @@ impl BackendEventLoop for GlutinEventLoop { } } + #[cfg(not(any(target_os = "android", target_os = "horizon")))] + { + if state_ref.settings.window_mode.get_glutin_fullscreen_type() != window.window().fullscreen() { + let fullscreen_type = state_ref.settings.window_mode.get_glutin_fullscreen_type(); + let cursor_visible = state_ref.settings.window_mode.should_display_mouse_cursor(); + + window.window().set_fullscreen(fullscreen_type); + window.window().set_cursor_visible(cursor_visible); + } + } + game.update(ctx).unwrap(); #[cfg(target_os = "android")] @@ -351,18 +362,6 @@ impl BackendEventLoop for GlutinEventLoop { } _ => (), } - - #[cfg(not(any(target_os = "android", target_os = "horizon")))] - { - if state_ref.settings.window_mode.get_glutin_fullscreen_type() != window.window().fullscreen() { - let fullscreen_type = state_ref.settings.window_mode.get_glutin_fullscreen_type(); - let cursor_visible = state_ref.settings.window_mode.should_display_mouse_cursor(); - - window.window().set_fullscreen(fullscreen_type); - - window.window().set_cursor_visible(cursor_visible); - } - } }); }