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:
@@ -72,6 +72,8 @@ impl InputState {
|
|||||||
hand.last_click = Instant::now();
|
hand.last_click = Instant::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent the mode from changing during a click
|
||||||
|
if !hand.before.click {
|
||||||
if hand.now.click_modifier_right {
|
if hand.now.click_modifier_right {
|
||||||
hand.interaction.mode = PointerMode::Right;
|
hand.interaction.mode = PointerMode::Right;
|
||||||
continue;
|
continue;
|
||||||
@@ -109,6 +111,7 @@ impl InputState {
|
|||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if hand.now.alt_click != hand.before.alt_click {
|
if hand.now.alt_click != hand.before.alt_click {
|
||||||
// Reap previous processes
|
// Reap previous processes
|
||||||
|
|||||||
Reference in New Issue
Block a user