summaryrefslogtreecommitdiff
path: root/client/src/window.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-10 18:36:20 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-10 18:36:20 +0100
commit79ab4f7be3c648ac3177c1d039af6ed8f5e44809 (patch)
tree8387588785a8910a110a53475317d1fa520873c7 /client/src/window.rs
parent9335f7193ae666c378f5011e1eb90db5721e43fd (diff)
downloadweareserver-79ab4f7be3c648ac3177c1d039af6ed8f5e44809.tar
weareserver-79ab4f7be3c648ac3177c1d039af6ed8f5e44809.tar.bz2
weareserver-79ab4f7be3c648ac3177c1d039af6ed8f5e44809.tar.zst
only rotate cam with locked mouse
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;
+ }
}
_ => (),
}