Skip to content

Commit 2a63649

Browse files
committed
put absolute mouse stuff behind disabled feature flag
so it doesnt double up the relative movements, which seem good enough now
1 parent 25db685 commit 2a63649

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ developer_ip7 = [] # CP0 Compare/timer calibration stats and debug prints
1414
lightning = []
1515
# Cranelift-based JIT compiler for MIPS → native translation.
1616
jit = ["cranelift-codegen", "cranelift-frontend", "cranelift-jit", "cranelift-module", "cranelift-native", "target-lexicon"]
17+
# Use WindowEvent::CursorMoved for mouse motion instead of DeviceEvent::MouseMotion.
18+
# Useful for testing absolute cursor position tracking. May cause doubled moves on some platforms.
19+
mouseabs = []
1720

1821
[dependencies]
1922
clap = { version = "4", features = ["derive"] }

src/ui.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ impl Ui {
522522
mouse_delta.lock().accum = (0.0, 0.0);
523523
}
524524
}
525+
#[cfg(feature = "mouseabs")]
525526
WindowEvent::CursorMoved { position, .. } => {
526527
if mouse_grabbed {
527528
let size = window.inner_size();

0 commit comments

Comments
 (0)