Merge branch 'refactor' of https://github.com/StapleButter/ctrulib into refactor
This commit is contained in:
commit
e26017a75c
@ -37,12 +37,12 @@ typedef struct
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GSPEVENT_PSC0 = 0,
|
||||
GSPEVENT_PSC0 = 0, // memory fill completed
|
||||
GSPEVENT_PSC1,
|
||||
GSPEVENT_VBlank0,
|
||||
GSPEVENT_VBlank1,
|
||||
GSPEVENT_PPF,
|
||||
GSPEVENT_P3D,
|
||||
GSPEVENT_PPF, // display transfer finished
|
||||
GSPEVENT_P3D, // command list processing finished
|
||||
GSPEVENT_DMA,
|
||||
|
||||
GSPEVENT_MAX, // used to know how many events there are
|
||||
|
@ -85,15 +85,15 @@ void gspEventThreadMain(u32 arg)
|
||||
svcClearEvent(gspEvent);
|
||||
|
||||
int count = gspEventData[1];
|
||||
int last = gspEventData[0] + count;
|
||||
int cur = gspEventData[0];
|
||||
int last = cur + count;
|
||||
while (last >= 0x34) last -= 0x34;
|
||||
int cur = last;
|
||||
int i;
|
||||
for (i = 0; i < count; i ++)
|
||||
{
|
||||
int curEvt = gspEventData[0xC + cur];
|
||||
cur --;
|
||||
if (cur < 0) cur += 0x34;
|
||||
cur ++;
|
||||
if (cur >= 0x34) cur -= 0x34;
|
||||
if (curEvt >= GSPEVENT_MAX) continue;
|
||||
svcSignalEvent(gspEvents[curEvt]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user