mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Merge pull request #21054 from lvonasek/hotfix-openxr-swapchain
OpenXR - Swapchain indexing fixed
This commit is contained in:
@@ -342,6 +342,12 @@ bool VR_InitFrame( engine_t* engine ) {
|
||||
hmdorientation = XrQuaternionf_ToEulerAngles(invViewTransform[0].orientation);
|
||||
IN_VRInputFrame(engine);
|
||||
|
||||
for (int i = 0; i < ovrMaxNumEyes; i++) {
|
||||
ovrFramebuffer* frameBuffer = &engine->appState.Renderer.FrameBuffer[i];
|
||||
frameBuffer->TextureSwapChainIndex++;
|
||||
frameBuffer->TextureSwapChainIndex %= frameBuffer->TextureSwapChainLength;
|
||||
}
|
||||
|
||||
engine->appState.LayerCount = 0;
|
||||
memset(engine->appState.Layers, 0, sizeof(ovrCompositorLayer_Union) * ovrMaxLayerCount);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user