mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Don't allow save/restore ctx while list running.
This commit is contained in:
parent
4078dcd917
commit
17a4341bb3
1 changed files with 7 additions and 6 deletions
|
@ -470,10 +470,11 @@ u32 sceGeSaveContext(u32 ctxAddr)
|
|||
DEBUG_LOG(SCEGE, "sceGeSaveContext(%08x)", ctxAddr);
|
||||
gpu->SyncThread();
|
||||
|
||||
if (sizeof(gstate) > 512 * 4)
|
||||
if (gpu->DrawSync(1) != PSP_GE_LIST_COMPLETED)
|
||||
{
|
||||
ERROR_LOG(SCEGE, "AARGH! sizeof(gstate) has grown too large!");
|
||||
return 0;
|
||||
WARN_LOG(SCEGE, "sceGeSaveContext(%08x): lists in process, aborting", ctxAddr);
|
||||
// Real error code.
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Let's just dump gstate.
|
||||
|
@ -492,10 +493,10 @@ u32 sceGeRestoreContext(u32 ctxAddr)
|
|||
DEBUG_LOG(SCEGE, "sceGeRestoreContext(%08x)", ctxAddr);
|
||||
gpu->SyncThread();
|
||||
|
||||
if (sizeof(gstate) > 512 * 4)
|
||||
if (gpu->DrawSync(1) != PSP_GE_LIST_COMPLETED)
|
||||
{
|
||||
ERROR_LOG(SCEGE, "AARGH! sizeof(gstate) has grown too large!");
|
||||
return 0;
|
||||
WARN_LOG(SCEGE, "sceGeRestoreContext(%08x): lists in process, aborting", ctxAddr);
|
||||
return SCE_KERNEL_ERROR_BUSY;
|
||||
}
|
||||
|
||||
if (Memory::IsValidAddress(ctxAddr))
|
||||
|
|
Loading…
Add table
Reference in a new issue