Skip to content

Commit

Permalink
Merge pull request #230 from fjtrujy/improveGuSendList
Browse files Browse the repository at this point in the history
Fix return value for `sceGuSendList`
  • Loading branch information
fjtrujy authored Aug 24, 2024
2 parents 8827950 + bffb51b commit 62c71d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/gu/pspgu.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,9 @@ int sceGuCheckList(void);
* @param mode - Whether to place the list first or last in queue
* @param list - List to send
* @param context - Temporary storage for the GE context
* @return 0 for success, < 0 for failure
**/
void sceGuSendList(int mode, const void* list, PspGeContext* context);
int sceGuSendList(int mode, const void* list, PspGeContext* context);

/**
* Swap display and draw buffer
Expand Down
12 changes: 9 additions & 3 deletions src/gu/sceGuSendList.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <pspkernel.h>
#include <pspge.h>

void sceGuSendList(int mode, const void *list, PspGeContext *context)
int sceGuSendList(int mode, const void *list, PspGeContext *context)
{
gu_settings.signal_offset = 0;

Expand All @@ -26,12 +26,18 @@ void sceGuSendList(int mode, const void *list, PspGeContext *context)
switch (mode)
{
case GU_HEAD:
list_id = sceGeListEnQueueHead(list, 0, callback, &args);
list_id = sceGeListEnQueueHead(list, NULL, callback, &args);
break;
case GU_TAIL:
list_id = sceGeListEnQueue(list, 0, callback, &args);
list_id = sceGeListEnQueue(list, NULL, callback, &args);
break;
}

if (list_id < 0)
{
return list_id;
}

ge_list_executed[1] = list_id;
return 0;
}

0 comments on commit 62c71d2

Please sign in to comment.