Skip to content

Commit

Permalink
Rawinput now follows keyboard focus properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Jan 2, 2024
1 parent 64c930f commit 413b619
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/qt/qt_winrawinputfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,15 @@ extern "C" void win_joystick_handle(PRAWINPUT);
std::unique_ptr<WindowsRawInputFilter>
WindowsRawInputFilter::Register(MainWindow *window)
{
HWND wnd = (HWND) window->winId();

RAWINPUTDEVICE rid[2] = {
{.usUsagePage = 0x01,
.usUsage = 0x06,
.dwFlags = RIDEV_NOHOTKEYS,
.hwndTarget = wnd},
.hwndTarget = nullptr},
{ .usUsagePage = 0x01,
.usUsage = 0x02,
.dwFlags = 0,
.hwndTarget = wnd}
.hwndTarget = nullptr}
};

if (RegisterRawInputDevices(rid, 2, sizeof(rid[0])) == FALSE)
Expand Down

0 comments on commit 413b619

Please sign in to comment.