mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Fixed build failure
This commit is contained in:
parent
14a591c5d8
commit
32a9eed88d
2 changed files with 7 additions and 5 deletions
|
@ -41,8 +41,8 @@ SixenseManager::SixenseManager() {
|
|||
#endif
|
||||
_triggerPressed = false;
|
||||
_bumperPressed = false;
|
||||
_oldPos.setX(-1);
|
||||
_oldPos.setY(-1);
|
||||
_oldX = -1;
|
||||
_oldY = -1;
|
||||
}
|
||||
|
||||
SixenseManager::~SixenseManager() {
|
||||
|
@ -344,12 +344,13 @@ void SixenseManager::emulateMouse(PalmData *palm) {
|
|||
pos.setY(cursorRange * yAngle);
|
||||
|
||||
//If position has changed, emit a mouse move to the application
|
||||
if (pos.x() != _oldPos.x() || pos.y() != _oldPos.y()) {
|
||||
if (pos.x() != _oldX || pos.y() != _oldY) {
|
||||
QMouseEvent mouseEvent(static_cast<QEvent::Type>(CONTROLLER_MOVE_EVENT), pos, Qt::NoButton, Qt::NoButton, 0);
|
||||
|
||||
Application::getInstance()->mouseMoveEvent(&mouseEvent);
|
||||
}
|
||||
_oldPos = pos;
|
||||
_oldX = pos.x();
|
||||
_oldY = pos.y();
|
||||
|
||||
Qt::MouseButton bumperButton;
|
||||
Qt::MouseButton triggerButton;
|
||||
|
|
|
@ -73,7 +73,8 @@ private:
|
|||
// for mouse emulation
|
||||
bool _triggerPressed;
|
||||
bool _bumperPressed;
|
||||
QPoint _oldPos;
|
||||
int _oldX;
|
||||
int _oldY;
|
||||
};
|
||||
|
||||
#endif // hifi_SixenseManager_h
|
||||
|
|
Loading…
Reference in a new issue