Do not select stereo display debugger when HMD is set to Auto in Snowballs

hg/feature/sse2
kaetemi 11 years ago
parent 8de55c4cc5
commit 89a2a2ce99

@ -77,6 +77,7 @@ public:
std::string Manufacturer;
std::string ProductName;
std::string Serial; // A unique device identifier
bool AllowAuto; // Allow this device to be automatically selected when no device is configured
};
/**

@ -453,6 +453,7 @@ void CStereoDebugger::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
devInfo.Manufacturer = "NeL";
devInfo.ProductName = "Stereo Debugger";
devInfo.Serial = "NL-3D-DEBUG";
devInfo.AllowAuto = false;
devicesOut.push_back(devInfo);
}

@ -612,6 +612,7 @@ void CStereoLibVR::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
deviceInfoOut.Factory = static_cast<IStereoDeviceFactory *>(handle);
deviceInfoOut.Class = CStereoDeviceInfo::StereoHMD;
deviceInfoOut.Library = CStereoDeviceInfo::LibVR;
deviceInfoOut.AllowAuto = true;
//TODO: manufacturer, produc name
//TODO: serial
devicesOut.push_back(deviceInfoOut);

@ -816,6 +816,7 @@ void CStereoOVR::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
deviceInfoOut.Library = CStereoDeviceInfo::OVR; // "Oculus SDK";
deviceInfoOut.Manufacturer = deviceInfo.Manufacturer;
deviceInfoOut.ProductName = deviceInfo.ProductName;
deviceInfoOut.AllowAuto = true;
stringstream ser;
ser << id;
deviceInfoOut.Serial = ser.str(); // can't get the real serial from the sdk...

@ -93,9 +93,15 @@ void initCamera()
std::string hmdDeviceCfg = ConfigFile->getVar("HMDDevice").asString();
if (hmdDeviceCfg == std::string("Auto")
&& devices.begin() != devices.end())
{
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
{
if (it->AllowAuto)
{
deviceInfo = &devices[0];
}
}
}
else
{
std::string hmdDeviceId = ConfigFile->getVar("HMDDeviceId").asString();

Loading…
Cancel
Save