mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-04 01:00:09 +00:00
Merge pull request #230 from fjtrujy/improveGuSendList
Fix return value for `sceGuSendList`
This commit is contained in:
@@ -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
|
||||
|
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user