summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-rift-140/rift-140.cpp11
-rw-r--r--tracker-rift-140/rift-140.hpp2
2 files changed, 12 insertions, 1 deletions
diff --git a/tracker-rift-140/rift-140.cpp b/tracker-rift-140/rift-140.cpp
index 839dd190..164b47f7 100644
--- a/tracker-rift-140/rift-140.cpp
+++ b/tracker-rift-140/rift-140.cpp
@@ -37,7 +37,10 @@ module_status rift_tracker_140::start_tracker(QFrame*)
if (OVR_FAILURE(ovr_Initialize(nullptr)))
goto error;
- if(OVR_FAILURE(ovr_Create(&hmd, &luid)))
+ if (OVR_FAILURE(ovr_Create(&hmd, &luid)))
+ goto error;
+
+ if (OVR_FAILURE(ovr_SetTrackingOriginType(hmd, ovrTrackingOrigin_EyeLevel)))
goto error;
return status_ok();
@@ -91,4 +94,10 @@ void rift_tracker_140::data(double *data)
}
}
+bool rift_tracker_140::center()
+{
+ (void)ovr_RecenterTrackingOrigin(hmd);
+ return false;
+}
+
OPENTRACK_DECLARE_TRACKER(rift_tracker_140, dialog_rift_140, rift_140Dll)
diff --git a/tracker-rift-140/rift-140.hpp b/tracker-rift-140/rift-140.hpp
index 030addab..9cc34efa 100644
--- a/tracker-rift-140/rift-140.hpp
+++ b/tracker-rift-140/rift-140.hpp
@@ -20,6 +20,8 @@ public:
~rift_tracker_140() override;
module_status start_tracker(QFrame *) override;
void data(double *data) override;
+ bool center() override;
+
private:
ovrSession hmd = nullptr;
ovrGraphicsLuid luid {};