Split input and output params
This commit is contained in:
parent
d09ca69df7
commit
b7f0e00e40
@ -39,6 +39,7 @@ Result GSPLCD_GetVendors(u8 *vendors);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the LCD screens' brightness. Stubbed on old 3ds.
|
* @brief Gets the LCD screens' brightness. Stubbed on old 3ds.
|
||||||
* @param screen to get the brightness value.
|
* @param screen Screen to get the brightness value of.
|
||||||
|
* @param brightness Brightness value returned.
|
||||||
*/
|
*/
|
||||||
Result GSPLCD_GetBrightness(u32 *screen);
|
Result GSPLCD_GetBrightness(u32 screen, u32 *brightness);
|
@ -66,17 +66,17 @@ Result GSPLCD_GetVendors(u8 *vendors)
|
|||||||
return cmdbuf[1];
|
return cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GSPLCD_GetBrightness(u32 *screen)
|
Result GSPLCD_GetBrightness(u32 screen, u32 *brightness)
|
||||||
{
|
{
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
cmdbuf[0] = IPC_MakeHeader(0x15,1,0); // 0x150040
|
cmdbuf[0] = IPC_MakeHeader(0x15,1,0); // 0x150040
|
||||||
cmdbuf[1] = *screen;
|
cmdbuf[1] = screen;
|
||||||
|
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret;
|
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret;
|
||||||
|
|
||||||
*screen = cmdbuf[2];
|
*brightness = cmdbuf[2];
|
||||||
|
|
||||||
return cmdbuf[1];
|
return cmdbuf[2];
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user