From bc139ef46760fcb9b9b7e5e6bb8e4a914b8eb222 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 9 Sep 2016 20:01:15 +0200 Subject: tracker/rifts: show descriptive error messages, if any --- tracker-rift-042/ftnoir_tracker_rift_042.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tracker-rift-042') diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.cpp b/tracker-rift-042/ftnoir_tracker_rift_042.cpp index 901e4d1f..6107dc8d 100644 --- a/tracker-rift-042/ftnoir_tracker_rift_042.cpp +++ b/tracker-rift-042/ftnoir_tracker_rift_042.cpp @@ -2,6 +2,9 @@ #include "ftnoir_tracker_rift_042.h" #include "api/plugin-api.hpp" #include "compat/pi-constant.hpp" + +#include + #include #include #include @@ -30,9 +33,11 @@ void Rift_Tracker::start_tracker(QFrame*) } else { - // XXX need change ITracker et al api to allow for failure reporting - // this qmessagebox doesn't give any relevant details either -sh 20141012 - QMessageBox::warning(0,"Error", "Unable to start Rift tracker",QMessageBox::Ok,QMessageBox::NoButton); + QMessageBox::warning(nullptr, + "Error", + QStringLiteral("Unable to start Rift tracker: %1").arg(ovrHmd_GetLastError(nullptr)), + QMessageBox::Ok, + QMessageBox::NoButton); } } @@ -53,7 +58,7 @@ void Rift_Tracker::data(double *data) Quatf quat = pose.Orientation; float yaw, pitch, roll; quat.GetEulerAngles(&yaw, &pitch, &roll); - double yaw_ = yaw; + double yaw_ = double(yaw); if (s.useYawSpring) { yaw_ = old_yaw*s.persistence + (yaw_ - old_yaw); -- cgit v1.2.3