summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2025-07-04 22:50:00 +1200
committerBen Bridle <ben@derelict.engineering>2025-07-04 22:50:16 +1200
commit710a8ec8db8435227c924882522c137339288303 (patch)
treed238a6d6b5da17bbc9c1c7f066e7bcbcf8209eeb /src/devices
parentad2d2f258cc13c7672f304c00c2ff7af67601039 (diff)
downloadbedrock-pc-710a8ec8db8435227c924882522c137339288303.zip
Wake the input device when the mouse is scrolled
This was omitted in error.
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/input_device.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/devices/input_device.rs b/src/devices/input_device.rs
index 83e8039..d4e0cb0 100644
--- a/src/devices/input_device.rs
+++ b/src/devices/input_device.rs
@@ -185,11 +185,13 @@ impl InputDevice {
pub fn on_horizontal_scroll(&mut self, delta: f32) {
self.h_scroll += delta;
self.h_scroll = self.h_scroll.clamp(-32768.0, 32767.0);
+ if self.h_scroll.abs() >= 1.0 { self.wake = true; }
}
pub fn on_vertical_scroll(&mut self, delta: f32) {
self.v_scroll += delta;
self.v_scroll = self.v_scroll.clamp(i16::MIN as f32, i16::MAX as f32);
+ if self.v_scroll.abs() >= 1.0 { self.wake = true; }
}
pub fn update_horizontal_scroll(&mut self) {