mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 04:16:18 +00:00
Fix request queues in libSceZlib (#3041)
Queues are a FIFO data structure, so pop() removes the front, not the end.
This commit is contained in:
parent
93222c6f9f
commit
0e9420a7b2
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ void ZlibTaskThread(const std::stop_token& stop) {
|
||||||
if (!task_queue_cv.wait(lock, stop, [&] { return !task_queue.empty(); })) {
|
if (!task_queue_cv.wait(lock, stop, [&] { return !task_queue.empty(); })) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
task = task_queue.back();
|
task = task_queue.front();
|
||||||
task_queue.pop();
|
task_queue.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ s32 PS4_SYSV_ABI sceZlibWaitForDone(u64* request_id, const u32* timeout) {
|
||||||
} else {
|
} else {
|
||||||
done_queue_cv.wait(lock, pred);
|
done_queue_cv.wait(lock, pred);
|
||||||
}
|
}
|
||||||
*request_id = done_queue.back();
|
*request_id = done_queue.front();
|
||||||
done_queue.pop();
|
done_queue.pop();
|
||||||
}
|
}
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue