mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Check for fence id NO_FENCE before calling nvgfxEventWait() in _gfxDequeueBuffer(), since that does occur in some cases.
This commit is contained in:
parent
53319ff6d2
commit
e78f57d862
@ -136,7 +136,8 @@ static Result _gfxDequeueBuffer(void) {
|
||||
|
||||
rc = bufferProducerDequeueBuffer(async, g_gfx_framebuf_width, g_gfx_framebuf_height, 0, 0x300, &g_gfxCurrentProducerBuffer, fence);
|
||||
|
||||
if (R_SUCCEEDED(rc) && tmp_fence.is_valid) rc = nvgfxEventWait(tmp_fence.nv_fences[0].id, tmp_fence.nv_fences[0].value, -1);
|
||||
//Only run nvgfxEventWait when the fence is valid and the id is not NO_FENCE.
|
||||
if (R_SUCCEEDED(rc) && tmp_fence.is_valid && tmp_fence.nv_fences[0].id!=0xffffffff) rc = nvgfxEventWait(tmp_fence.nv_fences[0].id, tmp_fence.nv_fences[0].value, -1);
|
||||
|
||||
if (R_SUCCEEDED(rc)) g_gfxCurrentBuffer = (g_gfxCurrentBuffer + 1) & (g_nvgfx_totalframebufs-1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user