mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-12-23 20:22:40 +00:00
Improve sceGuStart
This commit is contained in:
@@ -499,10 +499,10 @@ void* sceGuGetMemory(int size);
|
||||
*
|
||||
* The previous context-type is stored so that it can be restored at sceGuFinish().
|
||||
*
|
||||
* @param cid - Context Type
|
||||
* @param ctype - Context Type
|
||||
* @param list - Pointer to display-list (16 byte aligned)
|
||||
**/
|
||||
void sceGuStart(int cid, void* list);
|
||||
void sceGuStart(int ctype, void* list);
|
||||
|
||||
/**
|
||||
* Finish current display list and go back to the parent context
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#include <pspkernel.h>
|
||||
#include <pspge.h>
|
||||
|
||||
void sceGuStart(int cid, void *list)
|
||||
void sceGuStart(int ctype, void *list)
|
||||
{
|
||||
GuContext *context = &gu_contexts[cid];
|
||||
GuContext *context = &gu_contexts[ctype];
|
||||
unsigned int *local_list = (unsigned int *)(((unsigned int)list) | 0x40000000);
|
||||
|
||||
// setup display list
|
||||
@@ -25,9 +25,9 @@ void sceGuStart(int cid, void *list)
|
||||
|
||||
// store current context
|
||||
|
||||
gu_curr_context = cid;
|
||||
gu_curr_context = ctype;
|
||||
|
||||
if (!cid)
|
||||
if (ctype == GU_DIRECT)
|
||||
{
|
||||
ge_list_executed[0] = sceGeListEnQueue(local_list, local_list, gu_settings.ge_callback_id, 0);
|
||||
gu_settings.signal_offset = 0;
|
||||
@@ -53,12 +53,9 @@ void sceGuStart(int cid, void *list)
|
||||
gu_init = 1;
|
||||
}
|
||||
|
||||
if (!gu_curr_context)
|
||||
if (ctype == GU_DIRECT && gu_draw_buffer.frame_width != 0)
|
||||
{
|
||||
if (gu_draw_buffer.frame_width)
|
||||
{
|
||||
sendCommandi(FRAME_BUF_PTR, ((unsigned int)gu_draw_buffer.frame_buffer) & 0xffffff);
|
||||
sendCommandi(FRAME_BUF_WIDTH, ((((unsigned int)gu_draw_buffer.frame_buffer) & 0xff000000) >> 8) | gu_draw_buffer.frame_width);
|
||||
}
|
||||
sendCommandi(FRAME_BUF_PTR, ((unsigned int)gu_draw_buffer.frame_buffer) & 0xffffff);
|
||||
sendCommandi(FRAME_BUF_WIDTH, ((((unsigned int)gu_draw_buffer.frame_buffer) & 0xff000000) >> 8) | gu_draw_buffer.frame_width);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user