From b294f65656432df91713aecdb9700cc8dbcd3c85 Mon Sep 17 00:00:00 2001 From: biroder <107300789+biroder@users.noreply.github.com> Date: Wed, 21 Jun 2023 12:15:08 +0300 Subject: [PATCH] fix of fix [ci skip] --- src/framework/backend_glutin.rs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) 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); - } - } }); }