History

reenable entitlements check

SamGondelman committed 8 years ago

Commit 799db331 parent 5729d353 files · +41 −38Browse files

Showing the changes to plugins/oculus/src/OculusBaseDisplayPlugin.cpp (1 of 3 files). Show all

Unified · Split

plugins/oculus/src/OculusBaseDisplayPlugin.cpp+6−5
@@ -23,13 +23,14 @@ void OculusBaseDisplayPlugin::resetSensors() { · 22 unmodified lines
2323 }
2424
2525 bool OculusBaseDisplayPlugin::beginFrameRender(uint32_t frameIndex) {
26− ovrSessionStatus status{};
27− if (!OVR_SUCCESS(ovr_GetSessionStatus(_session, &status))) {
26+ ovrResult getStatusResult;
27+ ovrSessionStatus status = ovr::getStatus(getStatusResult);
28+ if (!OVR_SUCCESS(getStatusResult)) {
2829 qCWarning(oculusLog) << "Unable to fetch Oculus session status" << ovr::getError();
2930 return false;
3031 }
3132
32− if (ovr::quitRequested(status)) {
33+ if (ovr::quitRequested(status) || !ovr::handleOVREvents()) {
3334 QMetaObject::invokeMethod(qApp, "quit");
3435 return false;
3536 }
@@ -44,7 +45,7 @@ bool OculusBaseDisplayPlugin::beginFrameRender(uint32_t frameIndex) { · 8 unmodified lines
4445 _currentRenderFrameInfo = FrameInfo();
4546 _currentRenderFrameInfo.sensorSampleTime = ovr_GetTimeInSeconds();
4647 _currentRenderFrameInfo.predictedDisplayTime = ovr_GetPredictedDisplayTime(_session, frameIndex);
47− auto trackingState = ovr_GetTrackingState(_session, _currentRenderFrameInfo.predictedDisplayTime, ovrTrue);
48+ auto trackingState = ovr::getTrackingState(_currentRenderFrameInfo.predictedDisplayTime, ovrTrue);
4849 _currentRenderFrameInfo.renderPose = ovr::toGlm(trackingState.HeadPose.ThePose);
4950 _currentRenderFrameInfo.presentPose = _currentRenderFrameInfo.renderPose;
5051
@@ -167,7 +168,7 @@ void OculusBaseDisplayPlugin::updatePresentPose() { · 116 unmodified lines
167168 ovrTrackingState trackingState;
168169 _currentPresentFrameInfo.sensorSampleTime = ovr_GetTimeInSeconds();
169170 _currentPresentFrameInfo.predictedDisplayTime = ovr_GetPredictedDisplayTime(_session, 0);
170− trackingState = ovr_GetTrackingState(_session, _currentRenderFrameInfo.predictedDisplayTime, ovrFalse);
171+ trackingState = ovr::getTrackingState(_currentRenderFrameInfo.predictedDisplayTime);
171172 _currentPresentFrameInfo.presentPose = ovr::toGlm(trackingState.HeadPose.ThePose);
172173 _currentPresentFrameInfo.renderPose = _currentPresentFrameInfo.presentPose;
173174 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t