More GSPLCD and GSPGPU functions. (#371)
This commit is contained in:
parent
8196e383c3
commit
fa6eb5db9e
@ -218,3 +218,8 @@ Result GSPGPU_UnregisterInterruptRelayQueue(void);
|
|||||||
/// Triggers a handling of commands written to shared memory.
|
/// Triggers a handling of commands written to shared memory.
|
||||||
Result GSPGPU_TriggerCmdReqQueue(void);
|
Result GSPGPU_TriggerCmdReqQueue(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets 3D_LEDSTATE to the input state value.
|
||||||
|
* @param disable False = 3D LED enable, true = 3D LED disable.
|
||||||
|
*/
|
||||||
|
Result GSPGPU_SetLedForceOff(bool disable);
|
@ -19,6 +19,12 @@ Result gspLcdInit(void);
|
|||||||
/// Exits GSPLCD.
|
/// Exits GSPLCD.
|
||||||
void gspLcdExit(void);
|
void gspLcdExit(void);
|
||||||
|
|
||||||
|
/// Powers on both backlights.
|
||||||
|
Result GSPLCD_PowerOnAllBacklights(void);
|
||||||
|
|
||||||
|
/// Powers off both backlights.
|
||||||
|
Result GSPLCD_PowerOffAllBacklights(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Powers on the backlight.
|
* @brief Powers on the backlight.
|
||||||
* @param screen Screen to power on.
|
* @param screen Screen to power on.
|
||||||
@ -31,6 +37,12 @@ Result GSPLCD_PowerOnBacklight(u32 screen);
|
|||||||
*/
|
*/
|
||||||
Result GSPLCD_PowerOffBacklight(u32 screen);
|
Result GSPLCD_PowerOffBacklight(u32 screen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets 3D_LEDSTATE to the input state value.
|
||||||
|
* @param disable False = 3D LED enable, true = 3D LED disable.
|
||||||
|
*/
|
||||||
|
Result GSPLCD_SetLedForceOff(bool disable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the LCD screens' vendors. Stubbed on old 3ds.
|
* @brief Gets the LCD screens' vendors. Stubbed on old 3ds.
|
||||||
* @param vendor Pointer to output the screen vendors to.
|
* @param vendor Pointer to output the screen vendors to.
|
||||||
|
@ -430,3 +430,15 @@ Result GSPGPU_RestoreVramSysArea(void)
|
|||||||
return cmdbuf[1];
|
return cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result GSPGPU_SetLedForceOff(bool disable)
|
||||||
|
{
|
||||||
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
|
cmdbuf[0] = IPC_MakeHeader(0x1C,1,0); // 0x1C0040
|
||||||
|
cmdbuf[1] = disable & 0xFF;
|
||||||
|
|
||||||
|
Result ret=0;
|
||||||
|
if (R_FAILED(ret = svcSendSyncRequest(gspGpuHandle))) return ret;
|
||||||
|
|
||||||
|
return cmdbuf[1];
|
||||||
|
}
|
@ -26,6 +26,30 @@ void gspLcdExit(void)
|
|||||||
svcCloseHandle(gspLcdHandle);
|
svcCloseHandle(gspLcdHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result GSPLCD_PowerOnAllBacklights(void)
|
||||||
|
{
|
||||||
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
|
cmdbuf[0] = IPC_MakeHeader(0x0F,0,0); // 0x0F0000
|
||||||
|
|
||||||
|
Result ret=0;
|
||||||
|
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret;
|
||||||
|
|
||||||
|
return cmdbuf[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
Result GSPLCD_PowerOffAllBacklights(void)
|
||||||
|
{
|
||||||
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
|
cmdbuf[0] = IPC_MakeHeader(0x10,0,0); // 0x100000
|
||||||
|
|
||||||
|
Result ret=0;
|
||||||
|
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret;
|
||||||
|
|
||||||
|
return cmdbuf[1];
|
||||||
|
}
|
||||||
|
|
||||||
Result GSPLCD_PowerOnBacklight(u32 screen)
|
Result GSPLCD_PowerOnBacklight(u32 screen)
|
||||||
{
|
{
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
@ -52,6 +76,19 @@ Result GSPLCD_PowerOffBacklight(u32 screen)
|
|||||||
return cmdbuf[1];
|
return cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result GSPLCD_SetLedForceOff(bool disable)
|
||||||
|
{
|
||||||
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
|
cmdbuf[0] = IPC_MakeHeader(0x13,1,0); // 0x130040
|
||||||
|
cmdbuf[1] = disable & 0xFF;
|
||||||
|
|
||||||
|
Result ret=0;
|
||||||
|
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret;
|
||||||
|
|
||||||
|
return cmdbuf[1];
|
||||||
|
}
|
||||||
|
|
||||||
Result GSPLCD_GetVendors(u8 *vendors)
|
Result GSPLCD_GetVendors(u8 *vendors)
|
||||||
{
|
{
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
Loading…
Reference in New Issue
Block a user