Forum Discussion
SiSShadowman
13 years agoHonored Guest
Correct usage of OVR::DeviceManager::EnumerateDevices<>
Hi guys, I'm currently writing a C# wrapper for the SDK, however my developer kit has not arrived yet, so I can't really test my code. However a friend of mine is currently testing it, and for some...
kojack
13 years agoMVP
A better way to iterate might be:
If there's no device returned by EnumerateDevices, it gives you Device_None as the type. The same happens when you have iterated past the end of the device list.
auto enumerator = _manager->EnumerateDevices<OVR::SensorDevice>(true);
while(enumerator.GetType() != Device_None)
{
// There's a device, use it...
enumerator.Next();
}
If there's no device returned by EnumerateDevices, it gives you Device_None as the type. The same happens when you have iterated past the end of the device list.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 4 months ago
- 1 year ago