From 27bdb498556197b56689be7bbf64b40040a4e9bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Mon, 12 Aug 2024 15:24:38 +0200 Subject: [PATCH] fix: layer rendering --- src/renderer_mtl.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer_mtl.mm b/src/renderer_mtl.mm index b9bd4ef766..c775d5ce43 100644 --- a/src/renderer_mtl.mm +++ b/src/renderer_mtl.mm @@ -546,9 +546,9 @@ bool init(const Init& _init) m_numWindows = 1; #if BX_PLATFORM_VISIONOS - if ((m_mainFrameBuffer.m_swapChain->m_useLayerRenderer - && NULL == m_mainFrameBuffer.m_swapChain->m_layerRenderer) - || NULL == m_mainFrameBuffer.m_swapChain->m_metalLayer) + bool useLayerRenderer = m_mainFrameBuffer.m_swapChain->m_useLayerRenderer; + if ((useLayerRenderer && NULL == m_mainFrameBuffer.m_swapChain->m_layerRenderer) + || (!useLayerRenderer && NULL == m_mainFrameBuffer.m_swapChain->m_metalLayer)) #else if (NULL == m_mainFrameBuffer.m_swapChain->m_metalLayer) #endif // BX_PLATFORM_VISIONOS