mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-29 10:15:42 -04:00
Qt: Don't pass key input to controllers/hotkeys when ImGui has focus
This commit is contained in:
parent
767343ca22
commit
c3d2999d78
@ -379,7 +379,12 @@ void QtHostInterface::onDisplayWindowKeyEvent(int key, bool pressed)
|
|||||||
|
|
||||||
const u32 masked_key = static_cast<u32>(key) & IMGUI_KEY_MASK;
|
const u32 masked_key = static_cast<u32>(key) & IMGUI_KEY_MASK;
|
||||||
if (masked_key < countof(ImGuiIO::KeysDown))
|
if (masked_key < countof(ImGuiIO::KeysDown))
|
||||||
ImGui::GetIO().KeysDown[masked_key] = pressed;
|
{
|
||||||
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
|
io.KeysDown[masked_key] = pressed;
|
||||||
|
if (io.WantCaptureKeyboard)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
HandleHostKeyEvent(key & ~Qt::KeyboardModifierMask, key & Qt::KeyboardModifierMask, pressed);
|
HandleHostKeyEvent(key & ~Qt::KeyboardModifierMask, key & Qt::KeyboardModifierMask, pressed);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user