mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'imbris/prefer-lock' into 'master'
Prefer locking the cursor when grabbing it (if that option is supported) See merge request veloren/veloren!4106
This commit is contained in:
commit
28dc1dc7b0
@ -1034,8 +1034,8 @@ impl Window {
|
||||
self.window.set_cursor_visible(!grab);
|
||||
let res = if grab {
|
||||
self.window
|
||||
.set_cursor_grab(CursorGrabMode::Confined)
|
||||
.or_else(|_e| self.window.set_cursor_grab(CursorGrabMode::Locked))
|
||||
.set_cursor_grab(CursorGrabMode::Locked)
|
||||
.or_else(|_e| self.window.set_cursor_grab(CursorGrabMode::Confined))
|
||||
} else {
|
||||
self.window.set_cursor_grab(CursorGrabMode::None)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user