This commit is contained in:
griffi-gh 2023-11-21 16:46:18 +01:00
parent 13816a6bd3
commit 003f2fd460

View file

@ -1,4 +1,3 @@
use glium::backend::Facade;
use shipyard::{AllStoragesView, Unique, NonSendSync, UniqueView, UniqueViewMut};
use crate::rendering::Renderer;
use winit::window::CursorGrabMode;
@ -14,7 +13,7 @@ pub fn update_cursor_lock_state(
return
}
if lock.is_inserted_or_modified() {
let gl_window = display.display.;
let gl_window = display.display.gl_window();
let window = gl_window.window();
window.set_cursor_grab(match lock.0 {
true => CursorGrabMode::Confined,