mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-22 23:06:18 +00:00
Do not select stereo display debugger when HMD is set to Auto in Snowballs
This commit is contained in:
parent
2833cc42d4
commit
7989e9e6bc
5 changed files with 11 additions and 1 deletions
|
@ -77,6 +77,7 @@ public:
|
||||||
std::string Manufacturer;
|
std::string Manufacturer;
|
||||||
std::string ProductName;
|
std::string ProductName;
|
||||||
std::string Serial; // A unique device identifier
|
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.Manufacturer = "NeL";
|
||||||
devInfo.ProductName = "Stereo Debugger";
|
devInfo.ProductName = "Stereo Debugger";
|
||||||
devInfo.Serial = "NL-3D-DEBUG";
|
devInfo.Serial = "NL-3D-DEBUG";
|
||||||
|
devInfo.AllowAuto = false;
|
||||||
devicesOut.push_back(devInfo);
|
devicesOut.push_back(devInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -612,6 +612,7 @@ void CStereoLibVR::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
|
||||||
deviceInfoOut.Factory = static_cast<IStereoDeviceFactory *>(handle);
|
deviceInfoOut.Factory = static_cast<IStereoDeviceFactory *>(handle);
|
||||||
deviceInfoOut.Class = CStereoDeviceInfo::StereoHMD;
|
deviceInfoOut.Class = CStereoDeviceInfo::StereoHMD;
|
||||||
deviceInfoOut.Library = CStereoDeviceInfo::LibVR;
|
deviceInfoOut.Library = CStereoDeviceInfo::LibVR;
|
||||||
|
deviceInfoOut.AllowAuto = true;
|
||||||
//TODO: manufacturer, produc name
|
//TODO: manufacturer, produc name
|
||||||
//TODO: serial
|
//TODO: serial
|
||||||
devicesOut.push_back(deviceInfoOut);
|
devicesOut.push_back(deviceInfoOut);
|
||||||
|
|
|
@ -816,6 +816,7 @@ void CStereoOVR::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
|
||||||
deviceInfoOut.Library = CStereoDeviceInfo::OVR; // "Oculus SDK";
|
deviceInfoOut.Library = CStereoDeviceInfo::OVR; // "Oculus SDK";
|
||||||
deviceInfoOut.Manufacturer = deviceInfo.Manufacturer;
|
deviceInfoOut.Manufacturer = deviceInfo.Manufacturer;
|
||||||
deviceInfoOut.ProductName = deviceInfo.ProductName;
|
deviceInfoOut.ProductName = deviceInfo.ProductName;
|
||||||
|
deviceInfoOut.AllowAuto = true;
|
||||||
stringstream ser;
|
stringstream ser;
|
||||||
ser << id;
|
ser << id;
|
||||||
deviceInfoOut.Serial = ser.str(); // can't get the real serial from the sdk...
|
deviceInfoOut.Serial = ser.str(); // can't get the real serial from the sdk...
|
||||||
|
|
|
@ -94,7 +94,13 @@ void initCamera()
|
||||||
if (hmdDeviceCfg == std::string("Auto")
|
if (hmdDeviceCfg == std::string("Auto")
|
||||||
&& devices.begin() != devices.end())
|
&& 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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue