summaryrefslogtreecommitdiffhomepage
path: root/tracker-rift-042/ftnoir_tracker_rift_042.cpp
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-042/ftnoir_tracker_rift_042.cpp
parente89709a801e7874bc02c66848c638c6a0ccc85c1 (diff)
api: add status check for modules
Diffstat (limited to 'tracker-rift-042/ftnoir_tracker_rift_042.cpp')
-rw-r--r--tracker-rift-042/ftnoir_tracker_rift_042.cpp11
1 files changed, 3 insertions, 8 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)));
}