Use std::vector to copy Spacemouse data from helper class to Application

This commit is contained in:
Torsten Sadowski
2018-11-06 22:16:34 +01:00
committed by wmayer
parent 020fb993b8
commit f88474454d
10 changed files with 17 additions and 12 deletions

View File

@@ -13,7 +13,7 @@ Implementation by Torsten Sadowski 2018
#include <spnav.h>
int Gui::GuiNativeEvent::motionDataArray[6];
std::vector<int> Gui::GuiNativeEvent::motionDataArray(6,0);
Gui::GuiNativeEvent::GuiNativeEvent(Gui::GUIApplicationNativeEventAware *app)
: QObject(app)
@@ -57,7 +57,7 @@ void Gui::GuiNativeEvent::pollSpacenav()
motionDataArray[3] = -ev.motion.rx;
motionDataArray[4] = -ev.motion.rz;
motionDataArray[5] = -ev.motion.ry;
mainApp->postMotionEvent(&motionDataArray[0]);
mainApp->postMotionEvent(motionDataArray);
break;
}
case SPNAV_EVENT_BUTTON: