summaryrefslogtreecommitdiffhomepage
path: root/tracker-rift-025/ftnoir_tracker_rift_025.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-rift-025/ftnoir_tracker_rift_025.cpp')
-rw-r--r--tracker-rift-025/ftnoir_tracker_rift_025.cpp41
1 files changed, 32 insertions, 9 deletions
diff --git a/tracker-rift-025/ftnoir_tracker_rift_025.cpp b/tracker-rift-025/ftnoir_tracker_rift_025.cpp
index 7c0b2a55..257b4502 100644
--- a/tracker-rift-025/ftnoir_tracker_rift_025.cpp
+++ b/tracker-rift-025/ftnoir_tracker_rift_025.cpp
@@ -1,4 +1,18 @@
-/* Copyright: "i couldn't care less what anyone does with the 5 lines of code i wrote" - mm0zct */
+/* Copyright (c) 2013 mm0zct
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
#include "ftnoir_tracker_rift_025.h"
#include "api/plugin-api.hpp"
#include <OVR.h>
@@ -8,7 +22,7 @@
using namespace OVR;
-Rift_Tracker::Rift_Tracker()
+rift_tracker_025::rift_tracker_025()
{
pManager = NULL;
pSensor = NULL;
@@ -16,7 +30,7 @@ Rift_Tracker::Rift_Tracker()
old_yaw = 0;
}
-Rift_Tracker::~Rift_Tracker()
+rift_tracker_025::~rift_tracker_025()
{
if (pSensor)
pSensor->Release();
@@ -27,7 +41,7 @@ Rift_Tracker::~Rift_Tracker()
System::Destroy();
}
-void Rift_Tracker::start_tracker(QFrame*)
+void rift_tracker_025::start_tracker(QFrame*)
{
System::Init(Log::ConfigureDefaultLog(LogMask_All));
pManager = DeviceManager::Create();
@@ -46,23 +60,32 @@ void Rift_Tracker::start_tracker(QFrame*)
}
else
{
- QMessageBox::warning(0,"Error", "Unable to create Rift sensor",QMessageBox::Ok,QMessageBox::NoButton);
+ QMessageBox::warning(nullptr,
+ QCoreApplication::translate("rift_tracker_025", "Error"),
+ QCoreApplication::translate("rift_tracker_025", "Unable to create Rift sensor"),
+ QMessageBox::Ok,QMessageBox::NoButton);
}
}
else
{
- QMessageBox::warning(0,"Error", "Unable to enumerate Rift tracker",QMessageBox::Ok,QMessageBox::NoButton);
+ QMessageBox::warning(nullptr,
+ QCoreApplication::translate("rift_tracker_025", "Error"),
+ QCoreApplication::translate("rift_tracker_025", "Unable to enumerate Rift tracker"),
+ QMessageBox::Ok,QMessageBox::NoButton);
}
}
else
{
- QMessageBox::warning(0,"Error", "Unable to start Rift tracker",QMessageBox::Ok,QMessageBox::NoButton);
+ QMessageBox::warning(nullptr,
+ QCoreApplication::translate("rift_tracker_025", "Error"),
+ QCoreApplication::translate("rift_tracker_025", "Unable to start Rift tracker"),
+ QMessageBox::Ok,QMessageBox::NoButton);
}
}
-void Rift_Tracker::data(double *data)
+void rift_tracker_025::data(double *data)
{
if (pSFusion != NULL && pSensor != NULL)
{
@@ -100,4 +123,4 @@ void Rift_Tracker::data(double *data)
}
}
-OPENTRACK_DECLARE_TRACKER(Rift_Tracker, dialog_rift_025, rift_025Dll)
+OPENTRACK_DECLARE_TRACKER(rift_tracker_025, dialog_rift_025, rift_025Dll)