From 9aecf36f7ee11fe0e8dfebc8eca405c79aadfa62 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 13 Jan 2021 15:15:25 +0100 Subject: [PATCH] Win32: [skip ci] fix support of SpaceMouse Plus XT --- src/Gui/3Dconnexion/GuiNativeEventWin32.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp b/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp index e69faa5bd7..ec519955fb 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp +++ b/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp @@ -792,7 +792,12 @@ bool Gui::GuiNativeEvent::TranslateRawInputData(UINT nInputCode, PRAWINPUT pRawI if (sRidDeviceInfo.hid.dwVendorId == LOGITECH_VENDOR_ID || sRidDeviceInfo.hid.dwVendorId == CONNEXION_VENDOR_ID) { switch (sRidDeviceInfo.hid.dwProductId) { case eSpaceMousePlusXT: - return TranslateSpaceMouseOldGeneric(nInputCode, pRawInput, sRidDeviceInfo.hid.dwProductId); + if (pRawInput->data.hid.bRawData[0] != 0x00) { + return TranslateSpaceMouseNewGeneric(nInputCode, pRawInput, sRidDeviceInfo.hid.dwProductId); + } + else { + return TranslateSpaceMouseOldGeneric(nInputCode, pRawInput, sRidDeviceInfo.hid.dwProductId); + } case eSpaceMouseEnterprise: return TranslateSpaceMouseEnterprise(nInputCode, pRawInput, sRidDeviceInfo.hid.dwProductId); case eSpacePilot: