mirror of https://github.com/wayvr-org/wayvr.git
prevent the mode from changing during a click (#273)
Fixes mouse buttons getting stuck if trigger is released in a different mode than the initial click.
This commit is contained in:
parent
e390634d4f
commit
a6da79bf3d
|
|
@ -72,6 +72,8 @@ impl InputState {
|
|||
hand.last_click = Instant::now();
|
||||
}
|
||||
|
||||
// Prevent the mode from changing during a click
|
||||
if !hand.before.click {
|
||||
if hand.now.click_modifier_right {
|
||||
hand.interaction.mode = PointerMode::Right;
|
||||
continue;
|
||||
|
|
@ -109,6 +111,7 @@ impl InputState {
|
|||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
if hand.now.alt_click != hand.before.alt_click {
|
||||
// Reap previous processes
|
||||
|
|
|
|||
Loading…
Reference in New Issue