mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-19 13:46:13 +00:00
Add library name to device name, re #43
This commit is contained in:
parent
31e96ad6c5
commit
8fad0e92b7
3 changed files with 4 additions and 2 deletions
|
@ -61,6 +61,7 @@ public:
|
||||||
uint8 Identifier;
|
uint8 Identifier;
|
||||||
NLMISC::CSmartPtr<NLMISC::CRefCount> Factory;
|
NLMISC::CSmartPtr<NLMISC::CRefCount> Factory;
|
||||||
|
|
||||||
|
std::string Library;
|
||||||
std::string Manufacturer;
|
std::string Manufacturer;
|
||||||
std::string ProductName;
|
std::string ProductName;
|
||||||
};
|
};
|
||||||
|
|
|
@ -177,6 +177,7 @@ void CStereoOVR::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
|
||||||
deviceInfoOut.Factory = static_cast<NLMISC::CRefCount *>(handle);
|
deviceInfoOut.Factory = static_cast<NLMISC::CRefCount *>(handle);
|
||||||
handle->DeviceHandle = devices;
|
handle->DeviceHandle = devices;
|
||||||
deviceInfoOut.Class = 1; // OVR::HMDDevice
|
deviceInfoOut.Class = 1; // OVR::HMDDevice
|
||||||
|
deviceInfoOut.Library = "Oculus SDK";
|
||||||
deviceInfoOut.Identifier = id;
|
deviceInfoOut.Identifier = id;
|
||||||
deviceInfoOut.Manufacturer = deviceInfo.Manufacturer;
|
deviceInfoOut.Manufacturer = deviceInfo.Manufacturer;
|
||||||
deviceInfoOut.ProductName = deviceInfo.ProductName;
|
deviceInfoOut.ProductName = deviceInfo.ProductName;
|
||||||
|
|
|
@ -85,7 +85,7 @@ void initCamera()
|
||||||
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
||||||
{
|
{
|
||||||
std::stringstream name;
|
std::stringstream name;
|
||||||
name << std::string("[") << (uint32)it->Identifier << "] [" << it->Manufacturer << " - " << it->ProductName << "]";
|
name << std::string("[") << (uint32)it->Identifier << "] [" << it->Library << " - " << it->Manufacturer << " - " << it->ProductName << "]";
|
||||||
nlinfo("Stereo Device: %s", name.str().c_str());
|
nlinfo("Stereo Device: %s", name.str().c_str());
|
||||||
}
|
}
|
||||||
CStereoDeviceInfo *deviceInfo = NULL;
|
CStereoDeviceInfo *deviceInfo = NULL;
|
||||||
|
@ -101,7 +101,7 @@ void initCamera()
|
||||||
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
||||||
{
|
{
|
||||||
std::stringstream name;
|
std::stringstream name;
|
||||||
name << it->Manufacturer << " - " << it->ProductName;
|
name << it->Library << " - " << it->Manufacturer << " - " << it->ProductName;
|
||||||
if (name.str() == hmdDeviceCfg)
|
if (name.str() == hmdDeviceCfg)
|
||||||
deviceInfo = &(*it);
|
deviceInfo = &(*it);
|
||||||
if (hmdDeviceId == it->Identifier)
|
if (hmdDeviceId == it->Identifier)
|
||||||
|
|
Loading…
Reference in a new issue