Implement GSPLCD::GetBrightness
This commit is contained in:
parent
f4232926c3
commit
d09ca69df7
@ -36,3 +36,9 @@ Result GSPLCD_PowerOffBacklight(u32 screen);
|
||||
* @param vendor Pointer to output the screen vendors to.
|
||||
*/
|
||||
Result GSPLCD_GetVendors(u8 *vendors);
|
||||
|
||||
/**
|
||||
* @brief Gets the LCD screens' brightness. Stubbed on old 3ds.
|
||||
* @param screen to get the brightness value.
|
||||
*/
|
||||
Result GSPLCD_GetBrightness(u32 *screen);
|
@ -66,3 +66,17 @@ Result GSPLCD_GetVendors(u8 *vendors)
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result GSPLCD_GetBrightness(u32 *screen)
|
||||
{
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0x15,1,0); // 0x150040
|
||||
cmdbuf[1] = *screen;
|
||||
|
||||
Result ret = 0;
|
||||
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret;
|
||||
|
||||
*screen = cmdbuf[2];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
Loading…
Reference in New Issue
Block a user