forked from eden-emu/eden
input_common: Release mouse buttons on out of focus
This commit is contained in:
parent
887972a91b
commit
1562858963
3 changed files with 18 additions and 1 deletions
|
@ -143,6 +143,15 @@ void Mouse::ReleaseButton(MouseButton button_) {
|
|||
mouse_info[button_index].data.axis = {0, 0};
|
||||
}
|
||||
|
||||
void Mouse::ReleaseAllButtons() {
|
||||
buttons = 0;
|
||||
for (auto& info : mouse_info) {
|
||||
info.tilt_speed = 0;
|
||||
info.data.pressed = false;
|
||||
info.data.axis = {0, 0};
|
||||
}
|
||||
}
|
||||
|
||||
void Mouse::BeginConfiguration() {
|
||||
buttons = 0;
|
||||
last_button = MouseButton::Undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue