summaryrefslogtreecommitdiffhomepage
path: root/tracker-rift-042
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-rift-042')
-rw-r--r--tracker-rift-042/ftnoir_tracker_rift_042.cpp11
-rw-r--r--tracker-rift-042/ftnoir_tracker_rift_042.h6
2 files changed, 7 insertions, 10 deletions
diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.cpp b/tracker-rift-042/ftnoir_tracker_rift_042.cpp
index 0e52812d..c8ced38f 100644
--- a/tracker-rift-042/ftnoir_tracker_rift_042.cpp
+++ b/tracker-rift-042/ftnoir_tracker_rift_042.cpp
@@ -36,22 +36,17 @@ rift_tracker_042::~rift_tracker_042()
ovr_Shutdown();
}
-void rift_tracker_042::start_tracker(QFrame*)
+module_status rift_tracker_042::start_tracker(QFrame*)
{
ovr_Initialize();
hmd = ovrHmd_Create(0);
if (hmd)
{
ovrHmd_ConfigureTracking(hmd, ovrTrackingCap_Orientation | ovrTrackingCap_MagYawCorrection | ovrTrackingCap_Position, ovrTrackingCap_Orientation);
+ return status_ok();
}
else
- {
- QMessageBox::warning(nullptr,
- "Error",
- QCoreApplication::translate("rift_tracker_042", "Unable to start Rift tracker: %1").arg(ovrHmd_GetLastError(nullptr)),
- QMessageBox::Ok,
- QMessageBox::NoButton);
- }
+ return error(tr("Unable to start Rift tracker: %1").arg(ovrHmd_GetLastError(nullptr)));
}
diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.h b/tracker-rift-042/ftnoir_tracker_rift_042.h
index 82081085..630878b9 100644
--- a/tracker-rift-042/ftnoir_tracker_rift_042.h
+++ b/tracker-rift-042/ftnoir_tracker_rift_042.h
@@ -21,12 +21,14 @@ struct settings : opts {
{}
};
-class rift_tracker_042 : public ITracker
+class rift_tracker_042 : public QObject, public ITracker
{
+ Q_OBJECT
+
public:
rift_tracker_042();
virtual ~rift_tracker_042() override;
- void start_tracker(QFrame *) override;
+ module_status start_tracker(QFrame *) override;
void data(double *data) override;
private:
double old_yaw;