summaryrefslogtreecommitdiffhomepage
path: root/tracker-rift-140
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-12-03 22:23:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-12-04 12:19:26 +0100
commitb256886a5cb9f2ae3ebda70a2045b19ed9f4233e (patch)
tree4fa1e46de224cf834a05824dc1eb86001bdb3300 /tracker-rift-140
parente89709a801e7874bc02c66848c638c6a0ccc85c1 (diff)
api: add status check for modules
Diffstat (limited to 'tracker-rift-140')
-rw-r--r--tracker-rift-140/rift-140.cpp10
-rw-r--r--tracker-rift-140/rift-140.hpp2
2 files changed, 4 insertions, 8 deletions
diff --git a/tracker-rift-140/rift-140.cpp b/tracker-rift-140/rift-140.cpp
index ebcc7654..9880cb1e 100644
--- a/tracker-rift-140/rift-140.cpp
+++ b/tracker-rift-140/rift-140.cpp
@@ -35,7 +35,7 @@ rift_tracker_140::~rift_tracker_140()
}
}
-void rift_tracker_140::start_tracker(QFrame*)
+module_status rift_tracker_140::start_tracker(QFrame*)
{
if (OVR_FAILURE(ovr_Initialize(nullptr)))
goto error;
@@ -43,7 +43,7 @@ void rift_tracker_140::start_tracker(QFrame*)
if(OVR_FAILURE(ovr_Create(&hmd, &luid)))
goto error;
- return;
+ return status_ok();
error:
hmd = nullptr;
@@ -56,11 +56,7 @@ error:
ovr_Shutdown();
- QMessageBox::warning(nullptr,
- "Error",
- QCoreApplication::translate("rift_tracker_140", "Unable to start Rift tracker: %1").arg(strerror),
- QMessageBox::Ok,
- QMessageBox::NoButton);
+ return error(strerror);
}
void rift_tracker_140::data(double *data)
diff --git a/tracker-rift-140/rift-140.hpp b/tracker-rift-140/rift-140.hpp
index 47eb7cd2..13bebed4 100644
--- a/tracker-rift-140/rift-140.hpp
+++ b/tracker-rift-140/rift-140.hpp
@@ -25,7 +25,7 @@ class rift_tracker_140 : public ITracker
public:
rift_tracker_140();
~rift_tracker_140() override;
- void start_tracker(QFrame *) override;
+ module_status start_tracker(QFrame *) override;
void data(double *data) override;
private:
double old_yaw;