mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:43:45 +02:00
only pop to check entitlements if oculus store build
This commit is contained in:
parent
46086cdcce
commit
8f279ce1f7
1 changed files with 21 additions and 18 deletions
|
@ -145,28 +145,31 @@ void handleOVREvents() {
|
||||||
_reorientRequested = status.ShouldRecenter;
|
_reorientRequested = status.ShouldRecenter;
|
||||||
|
|
||||||
#ifdef OCULUS_APP_ID
|
#ifdef OCULUS_APP_ID
|
||||||
// pop messages to see if we got a return for an entitlement check
|
|
||||||
ovrMessageHandle message = ovr_PopMessage();
|
|
||||||
|
|
||||||
while (message) {
|
if (qApp->property(hifi::properties::OCULUS_STORE).toBool()) {
|
||||||
switch (ovr_Message_GetType(message)) {
|
// pop messages to see if we got a return for an entitlement check
|
||||||
case ovrMessage_Entitlement_GetIsViewerEntitled: {
|
ovrMessageHandle message = ovr_PopMessage();
|
||||||
if (!ovr_Message_IsError(message)) {
|
|
||||||
// this viewer is entitled, no need to flag anything
|
while (message) {
|
||||||
qCDebug(oculus) << "Oculus Platform entitlement check succeeded, proceeding normally";
|
switch (ovr_Message_GetType(message)) {
|
||||||
} else {
|
case ovrMessage_Entitlement_GetIsViewerEntitled: {
|
||||||
// we failed the entitlement check, set our flag so the app can stop
|
if (!ovr_Message_IsError(message)) {
|
||||||
qCDebug(oculus) << "Oculus Platform entitlement check failed, app will now quit" << OCULUS_APP_ID;
|
// this viewer is entitled, no need to flag anything
|
||||||
_quitRequested = true;
|
qCDebug(oculus) << "Oculus Platform entitlement check succeeded, proceeding normally";
|
||||||
|
} else {
|
||||||
|
// we failed the entitlement check, set our flag so the app can stop
|
||||||
|
qCDebug(oculus) << "Oculus Platform entitlement check failed, app will now quit" << OCULUS_APP_ID;
|
||||||
|
_quitRequested = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// free the message handle to cleanup and not leak
|
||||||
|
ovr_FreeMessage(message);
|
||||||
|
|
||||||
|
// pop the next message to check, if there is one
|
||||||
|
message = ovr_PopMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
// free the message handle to cleanup and not leak
|
|
||||||
ovr_FreeMessage(message);
|
|
||||||
|
|
||||||
// pop the next message to check, if there is one
|
|
||||||
message = ovr_PopMessage();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue