From 0395ea02a1caab163b67eac6948c787571cfcf80 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 24 Feb 2023 16:50:38 +0600 Subject: [PATCH] qt: Poll from Qt code instead of RawInput code on Windows when absolute mode is used Fixes tablet input --- src/qt/qt_rendererstack.cpp | 8 +++++--- src/qt/qt_winrawinputfilter.cpp | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index 3d5faff34..9ebd891c3 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -145,9 +145,11 @@ void RendererStack::mousePoll() { #ifdef Q_OS_WINDOWS - mouse_x_abs = mousedata.x_abs; - mouse_y_abs = mousedata.y_abs; - return; + if (mouse_mode == 0) { + mouse_x_abs = mousedata.x_abs; + mouse_y_abs = mousedata.y_abs; + return; + } #endif #ifndef __APPLE__ mouse_x = mousedata.deltax; diff --git a/src/qt/qt_winrawinputfilter.cpp b/src/qt/qt_winrawinputfilter.cpp index 6690a08eb..309f7b2d0 100644 --- a/src/qt/qt_winrawinputfilter.cpp +++ b/src/qt/qt_winrawinputfilter.cpp @@ -373,6 +373,7 @@ WindowsRawInputFilter::mouse_handle(PRAWINPUT raw) void WindowsRawInputFilter::mousePoll() { + if (mouse_mode >= 1) return; if (mouse_capture || video_fullscreen) { static int b = 0;