diff --git a/libctru/include/3ds/services/gsplcd.h b/libctru/include/3ds/services/gsplcd.h index 12545a1..0ac9a97 100644 --- a/libctru/include/3ds/services/gsplcd.h +++ b/libctru/include/3ds/services/gsplcd.h @@ -33,5 +33,6 @@ 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_GetVendor(void); \ No newline at end of file +Result GSPLCD_GetVendors(u8 *vendors); \ No newline at end of file diff --git a/libctru/source/services/gsplcd.c b/libctru/source/services/gsplcd.c index 4daff6d..7f58068 100644 --- a/libctru/source/services/gsplcd.c +++ b/libctru/source/services/gsplcd.c @@ -52,7 +52,7 @@ Result GSPLCD_PowerOffBacklight(u32 screen) return cmdbuf[1]; } -Result GSPLCD_GetVendor(void) +Result GSPLCD_GetVendors(u8 *vendors) { u32 *cmdbuf = getThreadCommandBuffer(); @@ -60,7 +60,9 @@ Result GSPLCD_GetVendor(void) Result ret=0; if (R_FAILED(ret = svcSendSyncRequest(gspLcdHandle))) return ret; + + if(vendors) *vendors = cmdbuf[2] & 0xFF; - return cmdbuf[2]; + return cmdbuf[1]; }