Skip to content

Commit bffb51b

Browse files
committed
Fix return value for sceGuSendList
1 parent 8827950 commit bffb51b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/gu/pspgu.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,9 @@ int sceGuCheckList(void);
564564
* @param mode - Whether to place the list first or last in queue
565565
* @param list - List to send
566566
* @param context - Temporary storage for the GE context
567+
* @return 0 for success, < 0 for failure
567568
**/
568-
void sceGuSendList(int mode, const void* list, PspGeContext* context);
569+
int sceGuSendList(int mode, const void* list, PspGeContext* context);
569570

570571
/**
571572
* Swap display and draw buffer

src/gu/sceGuSendList.c

+9-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <pspkernel.h>
1212
#include <pspge.h>
1313

14-
void sceGuSendList(int mode, const void *list, PspGeContext *context)
14+
int sceGuSendList(int mode, const void *list, PspGeContext *context)
1515
{
1616
gu_settings.signal_offset = 0;
1717

@@ -26,12 +26,18 @@ void sceGuSendList(int mode, const void *list, PspGeContext *context)
2626
switch (mode)
2727
{
2828
case GU_HEAD:
29-
list_id = sceGeListEnQueueHead(list, 0, callback, &args);
29+
list_id = sceGeListEnQueueHead(list, NULL, callback, &args);
3030
break;
3131
case GU_TAIL:
32-
list_id = sceGeListEnQueue(list, 0, callback, &args);
32+
list_id = sceGeListEnQueue(list, NULL, callback, &args);
3333
break;
3434
}
3535

36+
if (list_id < 0)
37+
{
38+
return list_id;
39+
}
40+
3641
ge_list_executed[1] = list_id;
42+
return 0;
3743
}

0 commit comments

Comments
 (0)