Add GSPLCD_GetVendors (#311)
This commit is contained in:
parent
b0768e552b
commit
bd34fd59db
@ -31,3 +31,8 @@ Result GSPLCD_PowerOnBacklight(u32 screen);
|
||||
*/
|
||||
Result GSPLCD_PowerOffBacklight(u32 screen);
|
||||
|
||||
/**
|
||||
* @brief Gets the LCD screens' vendors. Stubbed on old 3ds.
|
||||
* @param vendor Pointer to output the screen vendors to.
|
||||
*/
|
||||
Result GSPLCD_GetVendors(u8 *vendors);
|
@ -52,3 +52,17 @@ Result GSPLCD_PowerOffBacklight(u32 screen)
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result GSPLCD_GetVendors(u8 *vendors)
|
||||
{
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0x14,0,0); // 0x140000
|
||||
|
||||
Result ret=0;
|
||||
if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret;
|
||||
|
||||
if(vendors) *vendors = cmdbuf[2] & 0xFF;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user