Add gspIsPresentPending
This commit is contained in:
parent
4e25fb1d6c
commit
bf06f27a0e
@ -104,6 +104,12 @@ bool gspHasGpuRight(void);
|
|||||||
*/
|
*/
|
||||||
void gspPresentBuffer(unsigned screen, unsigned swap, const void* fb_a, const void* fb_b, u32 stride, u32 mode);
|
void gspPresentBuffer(unsigned screen, unsigned swap, const void* fb_a, const void* fb_b, u32 stride, u32 mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns true if a prior \ref gspPresentBuffer command is still pending to be processed by GSP.
|
||||||
|
* @param screen Screen ID (see \ref GSP_SCREEN_TOP and \ref GSP_SCREEN_BOTTOM)
|
||||||
|
*/
|
||||||
|
bool gspIsPresentPending(unsigned screen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configures a callback to run when a GSPGPU event occurs.
|
* @brief Configures a callback to run when a GSPGPU event occurs.
|
||||||
* @param id ID of the event.
|
* @param id ID of the event.
|
||||||
|
@ -257,6 +257,12 @@ void gspPresentBuffer(unsigned screen, unsigned swap, const void* fb_a, const vo
|
|||||||
} while (__strex(fbInfoHeader, u.header));
|
} while (__strex(fbInfoHeader, u.header));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool gspIsPresentPending(unsigned screen)
|
||||||
|
{
|
||||||
|
s32* fbInfoHeader = (s32*)((u8*)gspSharedMem + 0x200 + gspThreadId*0x80 + screen*0x40);
|
||||||
|
return (*fbInfoHeader & 0xff00) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
void gspSetEventCallback(GSPGPU_Event id, ThreadFunc cb, void* data, bool oneShot)
|
void gspSetEventCallback(GSPGPU_Event id, ThreadFunc cb, void* data, bool oneShot)
|
||||||
{
|
{
|
||||||
if(id>= GSPGPU_EVENT_MAX)return;
|
if(id>= GSPGPU_EVENT_MAX)return;
|
||||||
|
Loading…
Reference in New Issue
Block a user