diff --git a/src/hle/rt64_present_queue.cpp b/src/hle/rt64_present_queue.cpp index 6e85b8d..018513d 100644 --- a/src/hle/rt64_present_queue.cpp +++ b/src/hle/rt64_present_queue.cpp @@ -490,7 +490,7 @@ namespace RT64 { skipPresent = skipPresent || ext.swapChain->isEmpty(); - const Present &present = presents[processCursor]; + Present &present = presents[processCursor]; ext.workloadQueue->waitForWorkloadId(present.workloadId); if (!presentThreadRunning) { @@ -505,12 +505,13 @@ namespace RT64 { threadPresent(present, swapChainValid); } - if (!present.fbOperations.empty()) { - const std::scoped_lock lock(screenFbChangePoolMutex); - screenFbChangePool.release(present.fbOperations.front().writeChanges.id); - } - if (!present.paused) { + if (!present.fbOperations.empty()) { + const std::scoped_lock lock(screenFbChangePoolMutex); + screenFbChangePool.release(present.fbOperations.front().writeChanges.id); + present.fbOperations.clear(); + } + threadAdvanceBarrier(); }