From 2a510a23b480a24bac424383a663200e2c293f10 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 28 Sep 2020 08:06:41 +0200 Subject: [PATCH] Gui: [skip ci] suppress debug messages when older SpaceMouse/Joystick is connected --- src/Gui/3Dconnexion/GuiNativeEventWin32.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp b/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp index 20d625a96a00..dffe222f1b70 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp +++ b/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp @@ -911,37 +911,49 @@ bool Gui::GuiNativeEvent::ParseRawInput(UINT nInputCode, PRAWINPUT pRawInput) switch(pValueCaps[i].Range.UsageMin) { case HID_USAGE_GENERIC_X: // X-axis +#ifdef _TRACE_RI_RAWDATA qDebug("X-Axis: %d\n", svalue); +#endif deviceData.fAxes[0] = static_cast(svalue); deviceData.fIsDirty = true; break; case HID_USAGE_GENERIC_Y: // Y-axis +#ifdef _TRACE_RI_RAWDATA qDebug("Y-Axis: %d\n", svalue); +#endif deviceData.fAxes[1] = static_cast(svalue); deviceData.fIsDirty = true; break; case HID_USAGE_GENERIC_Z: // Z-axis +#ifdef _TRACE_RI_RAWDATA qDebug("Z-Axis: %d\n", svalue); +#endif deviceData.fAxes[2] = static_cast(svalue); deviceData.fIsDirty = true; break; case HID_USAGE_GENERIC_RX: // Rotate-X +#ifdef _TRACE_RI_RAWDATA qDebug("X-Rotate: %d\n", svalue); +#endif deviceData.fAxes[3] = static_cast(svalue); deviceData.fIsDirty = true; break; case HID_USAGE_GENERIC_RY: // Rotate-Y +#ifdef _TRACE_RI_RAWDATA qDebug("Y-Rotate: %d\n", svalue); +#endif deviceData.fAxes[4] = static_cast(svalue); deviceData.fIsDirty = true; break; case HID_USAGE_GENERIC_RZ: // Rotate-Z +#ifdef _TRACE_RI_RAWDATA qDebug("Z-Rotate: %d\n", svalue); +#endif deviceData.fAxes[5] = static_cast(svalue); deviceData.fIsDirty = true; break; @@ -955,7 +967,9 @@ bool Gui::GuiNativeEvent::ParseRawInput(UINT nInputCode, PRAWINPUT pRawInput) // Zero out the data if the app is not in foreground deviceData.fAxes.assign(6, 0.f); deviceData.fIsDirty = true; +#ifdef _TRACE_RI_RAWDATA qDebug("Not in foreground\n"); +#endif } //