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.
上级 86a41f84
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册