File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,9 +146,10 @@ void SlimeVRDriver::VRDriver::RunPoseRequestThread() {
146146 vr::PropertyContainerHandle_t prop_container = vr::VRProperties ()->TrackedDeviceToPropertyContainer (index);
147147 messages::ProtobufMessage* message = google::protobuf::Arena::CreateMessage<messages::ProtobufMessage>(&arena_);
148148
149- // Don't feed data about our own trackers, or Standable's fake ones.
150149 {
151150 vr::ETrackedPropertyError error{};
151+
152+ // Don't feed data about our own trackers and Standable's fake ones
152153 auto driver_name = vr::VRProperties ()->GetStringProperty (prop_container, vr::Prop_TrackingSystemName_String, &error);
153154 if (error != vr::TrackedProp_Success) {
154155 if (error != vr::TrackedProp_InvalidDevice && error != vr::TrackedProp_UnknownProperty)
@@ -157,6 +158,17 @@ void SlimeVRDriver::VRDriver::RunPoseRequestThread() {
157158 continue ;
158159 }
159160 if (driver_name == " slimevr" || driver_name == " standable" ) continue ;
161+
162+ auto device_class = (vr::ETrackedDeviceClass)vr::VRProperties ()->GetInt32Property (prop_container, vr::Prop_DeviceClass_Int32, &error);
163+ if (error != vr::TrackedProp_Success) {
164+ logger_->Log (" Failed to get Prop_DeviceClass_Int32 for device {}: {}" , index, vr::VRPropertiesRaw ()->GetPropErrorNameFromEnum (error));
165+ continue ;
166+ }
167+
168+ // Ignore devices that aren't HMD, controllers, or generic trackers
169+ if (device_class == vr::TrackedDeviceClass_Invalid || device_class >= vr::TrackedDeviceClass_TrackingReference) {
170+ continue ;
171+ }
160172 }
161173
162174 if (device.sent_add_message && !pose.bDeviceIsConnected ) {
You can’t perform that action at this time.
0 commit comments