summaryrefslogtreecommitdiffhomepage
path: root/tracker-steamvr/steamvr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-steamvr/steamvr.hpp')
-rw-r--r--tracker-steamvr/steamvr.hpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/tracker-steamvr/steamvr.hpp b/tracker-steamvr/steamvr.hpp
index 8c76ad17..61da2e05 100644
--- a/tracker-steamvr/steamvr.hpp
+++ b/tracker-steamvr/steamvr.hpp
@@ -1,25 +1,19 @@
#pragma once
-#include "api/plugin-api.hpp"
+
#include "ui_dialog.h"
+#include "api/plugin-api.hpp"
#include "options/options.hpp"
-#include "compat/euler.hpp"
-
-#include <openvr.h>
-
-#include <cmath>
-#include <memory>
#include <tuple>
+#include <climits>
#include <QString>
#include <QMutex>
-#include <QMutexLocker>
#include <QList>
-using namespace options;
+#include <openvr.h>
-using rmat = euler::rmat;
-using euler_t = euler::euler_t;
+using namespace options;
using vr_error_t = vr::EVRInitError;
using vr_t = vr::IVRSystem*;
@@ -54,9 +48,9 @@ struct device_list final
void refresh_device_list();
const QList<device_spec>& devices() const { return device_specs; }
- static cc_noinline maybe_pose get_pose(int k);
+ static never_inline maybe_pose get_pose(int k);
static QString error_string(vr_error_t error);
- static constexpr inline unsigned max_devices = vr::k_unMaxTrackedDeviceCount;
+ static constexpr unsigned max_devices = vr::k_unMaxTrackedDeviceCount;
template<typename F>
friend auto with_vr_lock(F&& fun) -> decltype(fun(vr_t(), vr_error_t()));
@@ -76,7 +70,7 @@ class steamvr : public QObject, public ITracker
static void matrix_to_euler(double& yaw, double& pitch, double& roll, const vr::HmdMatrix34_t& result);
settings s;
- int device_index;
+ unsigned device_index{UINT_MAX};
public:
steamvr();