libobs: Don't use was_down for hotkey detection
From MSDN: "The behavior of the least significant bit of the return value is retained strictly for compatibility with 16-bit Windows applications (which are non-preemptive) and should not be relied upon." This caused problems with hotkeys firing if the user pressed a hotkey key in another application, followed by the modifier keys at any other time. OBS would then think the hotkey key was just pressed based on the was_down behavior and incorrectly trigger a hotkey event. Fixes 0000443.
This commit is contained in:
parent
86a41f844f
commit
1f39b6a612
@ -384,8 +384,8 @@ static bool vk_down(DWORD vk)
|
||||
{
|
||||
short state = GetAsyncKeyState(vk);
|
||||
bool down = (state & 0x8000) != 0;
|
||||
bool was_down = (state & 0x1) != 0;
|
||||
return down || was_down;
|
||||
|
||||
return down;
|
||||
}
|
||||
|
||||
bool obs_hotkeys_platform_is_pressed(obs_hotkeys_platform_t *context,
|
||||
|
Loading…
x
Reference in New Issue
Block a user