Fix return value for sceGuSendList

This commit is contained in:
Francisco Javier Trujillo Mata
2024-08-19 13:58:32 +02:00
parent 882795081e
commit bffb51b4a1
2 changed files with 11 additions and 4 deletions

View File

@@ -564,8 +564,9 @@ int sceGuCheckList(void);
* @param mode - Whether to place the list first or last in queue * @param mode - Whether to place the list first or last in queue
* @param list - List to send * @param list - List to send
* @param context - Temporary storage for the GE context * @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 * Swap display and draw buffer

View File

@@ -11,7 +11,7 @@
#include <pspkernel.h> #include <pspkernel.h>
#include <pspge.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; gu_settings.signal_offset = 0;
@@ -26,12 +26,18 @@ void sceGuSendList(int mode, const void *list, PspGeContext *context)
switch (mode) switch (mode)
{ {
case GU_HEAD: case GU_HEAD:
list_id = sceGeListEnQueueHead(list, 0, callback, &args); list_id = sceGeListEnQueueHead(list, NULL, callback, &args);
break; break;
case GU_TAIL: case GU_TAIL:
list_id = sceGeListEnQueue(list, 0, callback, &args); list_id = sceGeListEnQueue(list, NULL, callback, &args);
break; break;
} }
if (list_id < 0)
{
return list_id;
}
ge_list_executed[1] = list_id; ge_list_executed[1] = list_id;
return 0;
} }