mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 16:38:27 +02:00
only do entitlements check once
This commit is contained in:
parent
0a9ac72e7b
commit
59fafa1f5c
1 changed files with 11 additions and 8 deletions
|
@ -82,15 +82,18 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OCULUS_APP_ID
|
#ifdef OCULUS_APP_ID
|
||||||
if (qApp->property(hifi::properties::OCULUS_STORE).toBool()) {
|
static std::once_flag once;
|
||||||
if (ovr_PlatformInitializeWindows(OCULUS_APP_ID) != ovrPlatformInitialize_Success) {
|
std::call_once(once, []() {
|
||||||
qCWarning(oculusLog) << "Unable to initialize the platform for entitlement check - fail the check" << ovr::getError();
|
if (qApp->property(hifi::properties::OCULUS_STORE).toBool()) {
|
||||||
return;
|
if (ovr_PlatformInitializeWindows(OCULUS_APP_ID) != ovrPlatformInitialize_Success) {
|
||||||
} else {
|
qCWarning(oculusLog) << "Unable to initialize the platform for entitlement check - fail the check" << ovr::getError();
|
||||||
qCDebug(oculusLog) << "Performing Oculus Platform entitlement check";
|
return;
|
||||||
ovr_Entitlement_GetIsViewerEntitled();
|
} else {
|
||||||
|
qCDebug(oculusLog) << "Performing Oculus Platform entitlement check";
|
||||||
|
ovr_Entitlement_GetIsViewerEntitled();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ovrGraphicsLuid luid;
|
ovrGraphicsLuid luid;
|
||||||
|
|
Loading…
Reference in a new issue