From e9db63f61d31ce9d2b2c7d9deb95f69c7011eef3 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 21 Sep 2013 14:58:39 -0700 Subject: [PATCH] Refuse to dequeue a running/completed list. --- GPU/GPUCommon.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index fabe57f93..2e465ee6b 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -291,17 +291,18 @@ u32 GPUCommon::DequeueList(int listid) { if (listid < 0 || listid >= DisplayListMaxCount || dls[listid].state == PSP_GE_DL_STATE_NONE) return SCE_KERNEL_ERROR_INVALID_ID; - if (dls[listid].state == PSP_GE_DL_STATE_RUNNING || dls[listid].state == PSP_GE_DL_STATE_PAUSED) - return 0x80000021; + auto &dl = dls[listid]; + if (dl.started) + return SCE_KERNEL_ERROR_BUSY; - dls[listid].state = PSP_GE_DL_STATE_NONE; + dl.state = PSP_GE_DL_STATE_NONE; if (listid == dlQueue.front()) PopDLQueue(); else dlQueue.remove(listid); - dls[listid].waitTicks = 0; + dl.waitTicks = 0; __GeTriggerWait(WAITTYPE_GELISTSYNC, listid); CheckDrawSync();