fix of fix [ci skip]

This commit is contained in:
biroder 2023-06-21 12:15:08 +03:00 committed by GitHub
parent a5ed1a370e
commit b294f65656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 12 deletions

View File

@ -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);
}
}
});
}