summaryrefslogtreecommitdiff
path: root/client/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/window.rs')
-rw-r--r--client/src/window.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/window.rs b/client/src/window.rs
index 7da0d74..107be34 100644
--- a/client/src/window.rs
+++ b/client/src/window.rs
@@ -118,8 +118,10 @@ impl ApplicationHandler for WindowState {
if let Some((_win, sta)) = &mut self.window {
match event {
DeviceEvent::MouseMotion { delta } => {
- sta.delta.mouse_acc.x += delta.0 as f32;
- sta.delta.mouse_acc.y += delta.1 as f32;
+ if self.lock {
+ sta.delta.mouse_acc.x += delta.0 as f32;
+ sta.delta.mouse_acc.y += delta.1 as f32;
+ }
}
_ => (),
}