Fix APT suspend with renderqueues
This commit is contained in:
parent
ba8656044f
commit
b276d8cec2
@ -42,8 +42,9 @@ static void C3Di_AptEventHook(APT_HookType hookType, void* param)
|
||||
switch (hookType)
|
||||
{
|
||||
case APTHOOK_ONSUSPEND:
|
||||
default:
|
||||
{
|
||||
if (ctx->renderQueueWaitDone)
|
||||
ctx->renderQueueWaitDone();
|
||||
break;
|
||||
}
|
||||
case APTHOOK_ONRESTORE:
|
||||
@ -62,6 +63,8 @@ static void C3Di_AptEventHook(APT_HookType hookType, void* param)
|
||||
env->Dirty(env);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,7 @@ typedef struct
|
||||
u16 fixedAttribDirty, fixedAttribEverDirty;
|
||||
C3D_FVec fixedAttribs[12];
|
||||
|
||||
void (* renderQueueWaitDone)(void);
|
||||
void (* renderQueueExit)(void);
|
||||
|
||||
} C3D_Context;
|
||||
|
@ -204,6 +204,12 @@ static void C3Di_RenderQueueExit(void)
|
||||
queuedState = 0;
|
||||
}
|
||||
|
||||
static void C3Di_RenderQueueWaitDone(void)
|
||||
{
|
||||
while (queuedCount || transferQueue || clearQueue)
|
||||
gspWaitForAnyEvent();
|
||||
}
|
||||
|
||||
bool checkRenderQueueInit(void)
|
||||
{
|
||||
C3D_Context* ctx = C3Di_GetContext();
|
||||
@ -214,6 +220,7 @@ bool checkRenderQueueInit(void)
|
||||
if (!ctx->renderQueueExit)
|
||||
{
|
||||
C3Di_RenderQueueInit();
|
||||
ctx->renderQueueWaitDone = C3Di_RenderQueueWaitDone;
|
||||
ctx->renderQueueExit = C3Di_RenderQueueExit;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user