mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-02-23 06:41:11 +00:00
Remove GetAsyncKeyState() check before sending mouse button events
It's unnecessary and breaks in cases where event processing is slow Fixes #1433
This commit is contained in:
parent
d075424225
commit
c5bf78176e
@ -408,8 +408,6 @@ namespace platf {
|
||||
|
||||
void
|
||||
button_mouse(input_t &input, int button, bool release) {
|
||||
constexpr auto KEY_STATE_DOWN = (SHORT) 0x8000;
|
||||
|
||||
INPUT i {};
|
||||
|
||||
i.type = INPUT_MOUSE;
|
||||
@ -439,14 +437,6 @@ namespace platf {
|
||||
mouse_button = VK_XBUTTON2;
|
||||
}
|
||||
|
||||
auto key_state = GetAsyncKeyState(mouse_button);
|
||||
bool key_state_down = (key_state & KEY_STATE_DOWN) != 0;
|
||||
if (key_state_down != release) {
|
||||
BOOST_LOG(warning) << "Button state of mouse_button ["sv << button << "] does not match the desired state"sv;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
send_input(i);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user