mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Merge pull request #5425 from hyperlogic/ajt/sixense-fix
Fix for memory corruption in Sixense ctor
This commit is contained in:
commit
a00c9dd602
2 changed files with 5 additions and 4 deletions
|
@ -264,7 +264,8 @@ const float MINIMUM_ARM_REACH = 0.3f; // meters
|
|||
const float MAXIMUM_NOISE_LEVEL = 0.05f; // meters
|
||||
const quint64 LOCK_DURATION = USECS_PER_SECOND / 4; // time for lock to be acquired
|
||||
|
||||
void SixenseManager::updateCalibration(const sixenseControllerData* controllers) {
|
||||
void SixenseManager::updateCalibration(void* controllersX) {
|
||||
auto controllers = reinterpret_cast<sixenseControllerData*>(controllersX);
|
||||
const sixenseControllerData* dataLeft = controllers;
|
||||
const sixenseControllerData* dataRight = controllers + 1;
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "InputPlugin.h"
|
||||
#include "InputDevice.h"
|
||||
|
||||
class QLibrary;
|
||||
|
||||
const unsigned int BUTTON_0 = 1U << 0; // the skinny button between 1 and 2
|
||||
const unsigned int BUTTON_1 = 1U << 5;
|
||||
const unsigned int BUTTON_2 = 1U << 6;
|
||||
|
@ -90,8 +92,7 @@ private:
|
|||
void handleAxisEvent(float x, float y, float trigger, int index);
|
||||
void handlePoseEvent(glm::vec3 position, glm::quat rotation, int index);
|
||||
|
||||
#ifdef HAVE_SIXENSE
|
||||
void updateCalibration(const sixenseControllerData* controllers);
|
||||
void updateCalibration(void* controllers);
|
||||
|
||||
int _calibrationState;
|
||||
|
||||
|
@ -114,7 +115,6 @@ private:
|
|||
QLibrary* _sixenseLibrary;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
bool _hydrasConnected;
|
||||
|
||||
bool _invertButtons = DEFAULT_INVERT_SIXENSE_MOUSE_BUTTONS;
|
||||
|
|
Loading…
Reference in a new issue