The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

steamvr: Make serial unique by appending xrt_hand

Monado gives both Playstation Move controllers the same xrt device name.

fixes #109

+7 -2
+7 -2
src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp
··· 10 10 11 11 #include <cstring> 12 12 #include <thread> 13 + #include <sstream> 13 14 14 15 #include "ovrd_log.hpp" 15 16 #include "openvr_driver.h" ··· 146 147 m_unObjectId = vr::k_unTrackedDeviceIndexInvalid; 147 148 m_pose = {}; 148 149 149 - strncpy(m_sSerialNumber, xdev->str, XRT_DEVICE_NAME_LEN); 150 - strncpy(m_sModelNumber, xdev->str, XRT_DEVICE_NAME_LEN); 150 + // append xrt_hand because SteamVR serial must be unique 151 + std::stringstream ss; 152 + ss << "[Monado] " << xdev->str << " " << hand; 153 + std::string name = ss.str(); 151 154 155 + strncpy(m_sSerialNumber, name.c_str(), XRT_DEVICE_NAME_LEN); 156 + strncpy(m_sModelNumber, name.c_str(), XRT_DEVICE_NAME_LEN); 152 157 153 158 switch (this->m_xdev->name) { 154 159 case XRT_DEVICE_INDEX_CONTROLLER: