Skip to content

Commit 0f69976

Browse files
committed
Keep calling xrEndFrame if shouldRender==false
1 parent 9436923 commit 0f69976

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

OpenXR.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@ void OpenXR::SubmitFramesToHMD(IDirect3DDevice9* dev)
470470
.type = XR_TYPE_FRAME_END_INFO,
471471
.displayTime = frameState.predictedDisplayTime,
472472
.environmentBlendMode = XR_ENVIRONMENT_BLEND_MODE_OPAQUE,
473-
.layerCount = 1,
474-
.layers = layers,
473+
.layerCount = frameState.shouldRender ? static_cast<uint32_t>(1) : static_cast<uint32_t>(0),
474+
.layers = frameState.shouldRender ? layers : nullptr,
475475
};
476476

477477
if (auto res = xrEndFrame(session, &frameEndInfo); res != XR_SUCCESS) {
@@ -528,8 +528,7 @@ bool OpenXR::UpdateVRPoses(Quaternion* carQuat, Config::HorizonLock lockSetting)
528528
}
529529

530530
if (frameState.shouldRender == XR_FALSE) {
531-
Dbg("Skipping frame");
532-
return false;
531+
Dbg("Skipping layer rendering");
533532
}
534533

535534
if (resetViewRequested) {

0 commit comments

Comments
 (0)