Skip to content

Commit

Permalink
Gui: [skip ci] suppress debug messages when older SpaceMouse/Joystick…
Browse files Browse the repository at this point in the history
… is connected
  • Loading branch information
wwmayer committed Sep 28, 2020
1 parent a4176fa commit 2a510a2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Gui/3Dconnexion/GuiNativeEventWin32.cpp
Expand Up @@ -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<float>(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<float>(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<float>(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<float>(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<float>(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<float>(svalue);
deviceData.fIsDirty = true;
break;
Expand All @@ -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
}

//
Expand Down

0 comments on commit 2a510a2

Please sign in to comment.