summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-steamvr/steamvr.cpp13
-rw-r--r--tracker-steamvr/steamvr.hpp3
2 files changed, 13 insertions, 3 deletions
diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp
index ecc738a0..7b75952e 100644
--- a/tracker-steamvr/steamvr.cpp
+++ b/tracker-steamvr/steamvr.cpp
@@ -85,6 +85,16 @@ void device_list::fill_device_specs(QList<device_spec>& list)
continue;
}
+ switch (v->GetTrackedDeviceClass(k))
+ {
+ case vr::ETrackedDeviceClass::TrackedDeviceClass_HMD:
+ dev.type = "HMD"; break;
+ case vr::ETrackedDeviceClass::TrackedDeviceClass_Controller:
+ dev.type = "Controller"; break;
+ default:
+ dev.type = "Unknown"; break;
+ }
+
dev.model = str;
dev.pose = device_states[k];
dev.k = k;
@@ -254,7 +264,8 @@ steamvr_dialog::steamvr_dialog()
device_list list;
for (const device_spec& spec : list.devices())
- ui.device->addItem(QStringLiteral("%1 [%2]").arg(spec.model).arg(spec.serial), QVariant(spec.serial));
+ ui.device->addItem(QStringLiteral("<%3> %1 [%2]").arg(spec.model).arg(spec.serial).arg(spec.type),
+ QVariant(spec.serial));
tie_setting(s.device_serial, ui.device);
}
diff --git a/tracker-steamvr/steamvr.hpp b/tracker-steamvr/steamvr.hpp
index 62815a58..a8903959 100644
--- a/tracker-steamvr/steamvr.hpp
+++ b/tracker-steamvr/steamvr.hpp
@@ -37,7 +37,7 @@ struct settings : opts
struct device_spec
{
vr::TrackedDevicePose_t pose;
- QString model, serial;
+ QString model, serial, type;
unsigned k;
};
@@ -98,7 +98,6 @@ public:
private:
Ui::dialog ui;
settings s;
- device_list devices;
private slots:
void doOK();