diff --git a/src/gu/pspgu.h b/src/gu/pspgu.h index dcbabc9dd9..637af41a3b 100644 --- a/src/gu/pspgu.h +++ b/src/gu/pspgu.h @@ -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 diff --git a/src/gu/sceGuSendList.c b/src/gu/sceGuSendList.c index b5c683271b..41ad460efb 100644 --- a/src/gu/sceGuSendList.c +++ b/src/gu/sceGuSendList.c @@ -11,7 +11,7 @@ #include #include -void sceGuSendList(int mode, const void *list, PspGeContext *context) +int sceGuSendList(int mode, const void *list, PspGeContext *context) { gu_settings.signal_offset = 0; @@ -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; }