mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
restore new oculus detect code from master
This commit is contained in:
parent
1e074ab81c
commit
270463fc4e
1 changed files with 9 additions and 1 deletions
|
@ -204,7 +204,15 @@ const QString & OculusDisplayPlugin::getName() const {
|
|||
|
||||
bool OculusDisplayPlugin::isSupported() const {
|
||||
#if (OVR_MAJOR_VERSION >= 6)
|
||||
return true;
|
||||
if (!OVR_SUCCESS(ovr_Initialize(nullptr))) {
|
||||
return false;
|
||||
}
|
||||
bool result = false;
|
||||
if (ovrHmd_Detect() > 0) {
|
||||
result = true;
|
||||
}
|
||||
ovr_Shutdown();
|
||||
return result;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue