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
23}23}
24 24
25bool OculusBaseDisplayPlugin::beginFrameRender(uint32_t frameIndex) {25bool OculusBaseDisplayPlugin::beginFrameRender(uint32_t frameIndex) {
26 ovrSessionStatus status{};26 ovrResult getStatusResult;
27 if (!OVR_SUCCESS(ovr_GetSessionStatus(_session, &status))) {27 ovrSessionStatus status = ovr::getStatus(getStatusResult);
28 if (!OVR_SUCCESS(getStatusResult)) {
28 qCWarning(oculusLog) << "Unable to fetch Oculus session status" << ovr::getError();29 qCWarning(oculusLog) << "Unable to fetch Oculus session status" << ovr::getError();
29 return false;30 return false;
30 }31 }
31 32
32 if (ovr::quitRequested(status)) {33 if (ovr::quitRequested(status) || !ovr::handleOVREvents()) {
33 QMetaObject::invokeMethod(qApp, "quit");34 QMetaObject::invokeMethod(qApp, "quit");
34 return false;35 return false;
35 }36 }
@@ -44,7 +45,7 @@ bool OculusBaseDisplayPlugin::beginFrameRender(uint32_t frameIndex) { · 8 unmodified lines
44 _currentRenderFrameInfo = FrameInfo();45 _currentRenderFrameInfo = FrameInfo();
45 _currentRenderFrameInfo.sensorSampleTime = ovr_GetTimeInSeconds();46 _currentRenderFrameInfo.sensorSampleTime = ovr_GetTimeInSeconds();
46 _currentRenderFrameInfo.predictedDisplayTime = ovr_GetPredictedDisplayTime(_session, frameIndex);47 _currentRenderFrameInfo.predictedDisplayTime = ovr_GetPredictedDisplayTime(_session, frameIndex);
47 auto trackingState = ovr_GetTrackingState(_session, _currentRenderFrameInfo.predictedDisplayTime, ovrTrue);48 auto trackingState = ovr::getTrackingState(_currentRenderFrameInfo.predictedDisplayTime, ovrTrue);
48 _currentRenderFrameInfo.renderPose = ovr::toGlm(trackingState.HeadPose.ThePose);49 _currentRenderFrameInfo.renderPose = ovr::toGlm(trackingState.HeadPose.ThePose);
49 _currentRenderFrameInfo.presentPose = _currentRenderFrameInfo.renderPose;50 _currentRenderFrameInfo.presentPose = _currentRenderFrameInfo.renderPose;
50 51
@@ -167,7 +168,7 @@ void OculusBaseDisplayPlugin::updatePresentPose() { · 116 unmodified lines
167 ovrTrackingState trackingState;168 ovrTrackingState trackingState;
168 _currentPresentFrameInfo.sensorSampleTime = ovr_GetTimeInSeconds();169 _currentPresentFrameInfo.sensorSampleTime = ovr_GetTimeInSeconds();
169 _currentPresentFrameInfo.predictedDisplayTime = ovr_GetPredictedDisplayTime(_session, 0);170 _currentPresentFrameInfo.predictedDisplayTime = ovr_GetPredictedDisplayTime(_session, 0);
170 trackingState = ovr_GetTrackingState(_session, _currentRenderFrameInfo.predictedDisplayTime, ovrFalse);171 trackingState = ovr::getTrackingState(_currentRenderFrameInfo.predictedDisplayTime);
171 _currentPresentFrameInfo.presentPose = ovr::toGlm(trackingState.HeadPose.ThePose);172 _currentPresentFrameInfo.presentPose = ovr::toGlm(trackingState.HeadPose.ThePose);
172 _currentPresentFrameInfo.renderPose = _currentPresentFrameInfo.presentPose;173 _currentPresentFrameInfo.renderPose = _currentPresentFrameInfo.presentPose;
173}174}

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