mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-19 13:46:13 +00:00
Do not select stereo display debugger when HMD is set to Auto in Snowballs
This commit is contained in:
parent
7fc746fce0
commit
f1dd6b8db9
5 changed files with 11 additions and 1 deletions
|
@ -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...
|
||||
|
|
|
@ -94,7 +94,13 @@ void initCamera()
|
|||
if (hmdDeviceCfg == std::string("Auto")
|
||||
&& devices.begin() != devices.end())
|
||||
{
|
||||
deviceInfo = &devices[0];
|
||||
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
||||
{
|
||||
if (it->AllowAuto)
|
||||
{
|
||||
deviceInfo = &devices[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue