mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-12-23 20:22:40 +00:00
Improve finish
This commit is contained in:
@@ -8,42 +8,6 @@
|
||||
|
||||
#include "guInternal.h"
|
||||
|
||||
int sceGuFinish(void)
|
||||
{
|
||||
switch (gu_curr_context)
|
||||
{
|
||||
case GU_DIRECT:
|
||||
case GU_SEND:
|
||||
{
|
||||
sendCommandi(FINISH, 0);
|
||||
sendCommandiStall(END, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case GU_CALL:
|
||||
{
|
||||
if (gu_call_mode == 1)
|
||||
{
|
||||
sendCommandi(SIGNAL, 0x120000);
|
||||
sendCommandi(END, 0);
|
||||
sendCommandiStall(NOP, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendCommandi(RET, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
unsigned int size = ((unsigned int)gu_list->current) - ((unsigned int)gu_list->start);
|
||||
|
||||
// go to parent list
|
||||
gu_curr_context = gu_list->parent_context;
|
||||
gu_list = &gu_contexts[gu_curr_context].list;
|
||||
return size;
|
||||
}
|
||||
|
||||
int sceGuFinishId(unsigned int id)
|
||||
{
|
||||
switch (gu_curr_context)
|
||||
@@ -79,3 +43,8 @@ int sceGuFinishId(unsigned int id)
|
||||
gu_list = &gu_contexts[gu_curr_context].list;
|
||||
return size;
|
||||
}
|
||||
|
||||
int sceGuFinish(void)
|
||||
{
|
||||
return sceGuFinishId(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user