diff --git a/driver/wsi.c b/driver/wsi.c index aded9b9..76a3ee9 100644 --- a/driver/wsi.c +++ b/driver/wsi.c @@ -507,7 +507,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RPIFUNC(vkAcquireNextImageKHR)( break; } - candidateIdx = (sc->backbufferIdx + 1) % sc->numImages; + candidateIdx = (candidateIdx + 1) % sc->numImages; } *pImageIndex = sc->backbufferIdx; //return back buffer index