Commit 711bddc5 authored by Robert Menzel's avatar Robert Menzel

started work on multiple Rift support - does not itterate all devices on Linux

parent 8d9486c6
cmake @ 2ab8ddba
Subproject commit 7c0af24a1217acf415769e0ac5d2861a2637e698
Subproject commit 2ab8ddba5b6c77730193e734bfb63cc45ac93e77
......@@ -24,6 +24,7 @@ SimpleRiftController::SimpleRiftController( uint32_t _riftnumber )
if (_riftnumber != 0) {
error() << "opening any other Rift than ID 0 is not supported yet! Trying to open Rift nr 0" << endl;
_riftnumber = 0;
}
#ifdef ACGL_DEBUG
......@@ -38,7 +39,19 @@ SimpleRiftController::SimpleRiftController( uint32_t _riftnumber )
error() << "could not create a Rift Device Manager" << endl;
mORDevice = NULL;
} else {
mORDevice = *mORManager->EnumerateDevices<HMDDevice>().CreateDevice();
DeviceEnumerator<HMDDevice> hmdEnumerator = mORManager->EnumerateDevices<HMDDevice>();
bool riftOK = true;
for (uint32_t i = 0; i < _riftnumber; ++i) {
riftOK = hmdEnumerator.Next();
}
if (riftOK) {
mORDevice = *hmdEnumerator.CreateDevice();
} else {
error() << "Rift number " << _riftnumber << " not found" << endl;
mORDevice = NULL;
}
}
mORHMDInfo = new OVR::HMDInfo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment