From bffb51b4a1b829162960d24caabff0e9c79acf24 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Mon, 19 Aug 2024 13:58:32 +0200 Subject: [PATCH] Fix return value for sceGuSendList --- src/gu/pspgu.h | 3 ++- src/gu/sceGuSendList.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) 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; }