Wait on present_queue instead of free_queue

This commit is contained in:
SutandoTsukai181 2020-06-10 15:41:48 +03:00 committed by xperia64
parent 3a381ad7c6
commit 18f5ba21f1

View File

@ -125,7 +125,7 @@ public:
// If theres no free frames, we will reuse the oldest render frame
if (free_queue.empty()) {
// wait for new entries in the present_queue
free_cv.wait_for(lock, elapsed, [this] { return !free_queue.empty(); });
free_cv.wait_for(lock, elapsed, [this] { return !present_queue.empty(); });
if (free_queue.empty()) {
auto frame = present_queue.back();
present_queue.pop_back();