mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-03-03 21:26:36 +00:00
st/oxr: Allow wait frame in headless since it does more than just waiting.
This commit is contained in:
parent
5becb60714
commit
713830338e
src/xrt/state_trackers/oxr
|
@ -108,10 +108,6 @@ oxr_xrWaitFrame(XrSession session,
|
|||
struct oxr_session *sess;
|
||||
struct oxr_logger log;
|
||||
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrWaitFrame");
|
||||
if (sess->compositor == NULL) {
|
||||
return oxr_error(&log, XR_ERROR_GRAPHICS_DEVICE_INVALID,
|
||||
"xrWaitFrame is illegal in headless sessions");
|
||||
}
|
||||
OXR_VERIFY_ARG_TYPE_AND_NULL(&log, frameState, XR_TYPE_FRAME_STATE);
|
||||
OXR_VERIFY_ARG_NOT_NULL(&log, frameState);
|
||||
|
||||
|
|
|
@ -391,10 +391,13 @@ oxr_session_frame_wait(struct oxr_logger *log,
|
|||
time_state_get_now_and_update(sess->sys->inst->timekeeping);
|
||||
|
||||
struct xrt_compositor *xc = sess->compositor;
|
||||
xc->wait_frame(xc, &frameState->predictedDisplayTime,
|
||||
&frameState->predictedDisplayPeriod);
|
||||
|
||||
frameState->shouldRender = should_render(sess->state);
|
||||
if (xc != NULL) {
|
||||
xc->wait_frame(xc, &frameState->predictedDisplayTime,
|
||||
&frameState->predictedDisplayPeriod);
|
||||
frameState->shouldRender = should_render(sess->state);
|
||||
} else {
|
||||
frameState->shouldRender = XR_FALSE;
|
||||
}
|
||||
|
||||
return oxr_session_success_result(sess);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue