Add library name to device name, re #43

--HG--
branch : multipass-stereo
This commit is contained in:
kaetemi 2013-06-26 02:55:15 +02:00
parent 64821ab4de
commit a79b9f7e65
3 changed files with 4 additions and 2 deletions

View file

@ -61,6 +61,7 @@ public:
uint8 Identifier;
NLMISC::CSmartPtr<NLMISC::CRefCount> Factory;
std::string Library;
std::string Manufacturer;
std::string ProductName;
};

View file

@ -177,6 +177,7 @@ void CStereoOVR::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
deviceInfoOut.Factory = static_cast<NLMISC::CRefCount *>(handle);
handle->DeviceHandle = devices;
deviceInfoOut.Class = 1; // OVR::HMDDevice
deviceInfoOut.Library = "Oculus SDK";
deviceInfoOut.Identifier = id;
deviceInfoOut.Manufacturer = deviceInfo.Manufacturer;
deviceInfoOut.ProductName = deviceInfo.ProductName;

View file

@ -85,7 +85,7 @@ void initCamera()
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
{
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());
}
CStereoDeviceInfo *deviceInfo = NULL;
@ -101,7 +101,7 @@ void initCamera()
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
{
std::stringstream name;
name << it->Manufacturer << " - " << it->ProductName;
name << it->Library << " - " << it->Manufacturer << " - " << it->ProductName;
if (name.str() == hmdDeviceCfg)
deviceInfo = &(*it);
if (hmdDeviceId == it->Identifier)