Skip to content

Commit 30dc651

Browse files
kynex7510fincs
authored andcommitted
Init gpu interrupt queue header
1 parent 8cbcce7 commit 30dc651

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libctru/source/services/gspgpu.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ Result gspInit(void)
184184
gspSharedMem = mappableAlloc(0x1000);
185185
svcMapMemoryBlock(gspSharedMemHandle, (u32)gspSharedMem, MEMPERM_READWRITE, MEMPERM_DONTCARE);
186186

187+
// Initialize interrupt queue header
188+
s32* sharedGspCmdBuf = (s32*)((u8*)gspSharedMem + 0x800 + gspThreadId*0x200);
189+
do {
190+
__ldrex(sharedGspCmdBuf);
191+
} while (__strex(sharedGspCmdBuf, 0));
192+
187193
// Start event handling thread
188194
gspRunEvents = true;
189195
gspLastEvent = -1;

0 commit comments

Comments
 (0)