Implement GSPGPU_SetLedForceOff as well

This commit is contained in:
Joel 2017-08-06 11:50:29 -04:00
parent ff540f2ad1
commit 83dfd10c44
2 changed files with 17 additions and 0 deletions

View File

@ -218,3 +218,8 @@ Result GSPGPU_UnregisterInterruptRelayQueue(void);
/// Triggers a handling of commands written to shared memory.
Result GSPGPU_TriggerCmdReqQueue(void);
/**
* @brief Sets 3D_LEDSTATE to the input state value.
* @param state 0 = 3D LED enable, 1 = 3D LED disable.
*/
Result GSPGPU_SetLedForceOff(u8 state);

View File

@ -430,3 +430,15 @@ Result GSPGPU_RestoreVramSysArea(void)
return cmdbuf[1];
}
Result GSPGPU_SetLedForceOff(u8 state)
{
u32 *cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = IPC_MakeHeader(0x1C,1,0); // 0x1C0040
cmdbuf[1] = state;
Result ret=0;
if (R_FAILED(ret = svcSendSyncRequest(gspGpuHandle))) return ret;
return cmdbuf[1];
}