基本输入检测

This commit is contained in:
2026-09-03 17:09:23 +08:00
parent 856baa697e
commit 22ca924e3e
4 changed files with 6 additions and 521 deletions
+1 -2
View File
@@ -11,7 +11,6 @@
namespace {
constexpr UINT kRidInput = 0x10000003;
constexpr USHORT kE0Flag = 0x02;
constexpr USHORT kMouseMoveAbsolute = 0x0001;
constexpr USHORT kMouseLeftDown = 0x0001;
constexpr USHORT kMouseLeftUp = 0x0002;
constexpr USHORT kMouseRightDown = 0x0004;
@@ -188,7 +187,7 @@ void RawInputDetector::handleMouse(const RAWMOUSE &mouse)
if (flags & kMouseX2Up) emit mouseButtonChanged(MouseCodeType::XButton2, false);
if (flags & kMouseWheel)
emit mouseWheelMoved(static_cast<qint16>(mouse.usButtonData));
if ((mouse.usFlags & kMouseMoveAbsolute) == 0 && (mouse.lLastX != 0 || mouse.lLastY != 0))
if (mouse.lLastX != 0 || mouse.lLastY != 0)
emit mouseMoved(mouse.lLastX, mouse.lLastY);
}
#endif