From dc813a060e9f178a69d1496e7dd8f222e730d741 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 26 Jun 2013 02:55:15 +0200 Subject: [PATCH] Add library name to device name, re #43 --- code/nel/include/nel/3d/stereo_ovr.h | 1 + code/nel/src/3d/stereo_ovr.cpp | 1 + code/snowballs2/client/src/camera.cpp | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/3d/stereo_ovr.h b/code/nel/include/nel/3d/stereo_ovr.h index ce61c1c2e..5f61c0595 100644 --- a/code/nel/include/nel/3d/stereo_ovr.h +++ b/code/nel/include/nel/3d/stereo_ovr.h @@ -61,6 +61,7 @@ public: uint8 Identifier; NLMISC::CSmartPtr Factory; + std::string Library; std::string Manufacturer; std::string ProductName; }; diff --git a/code/nel/src/3d/stereo_ovr.cpp b/code/nel/src/3d/stereo_ovr.cpp index c11d38774..40d94f901 100644 --- a/code/nel/src/3d/stereo_ovr.cpp +++ b/code/nel/src/3d/stereo_ovr.cpp @@ -177,6 +177,7 @@ void CStereoOVR::listDevices(std::vector &devicesOut) deviceInfoOut.Factory = static_cast(handle); handle->DeviceHandle = devices; deviceInfoOut.Class = 1; // OVR::HMDDevice + deviceInfoOut.Library = "Oculus SDK"; deviceInfoOut.Identifier = id; deviceInfoOut.Manufacturer = deviceInfo.Manufacturer; deviceInfoOut.ProductName = deviceInfo.ProductName; diff --git a/code/snowballs2/client/src/camera.cpp b/code/snowballs2/client/src/camera.cpp index d71ebc134..38db2d599 100644 --- a/code/snowballs2/client/src/camera.cpp +++ b/code/snowballs2/client/src/camera.cpp @@ -85,7 +85,7 @@ void initCamera() for (std::vector::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::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)