Display brightness explicitly

This commit is contained in:
Joel16 2017-09-26 14:45:31 -05:00
parent c4fe6742a1
commit fb02508df6

View File

@ -36,23 +36,15 @@ bool detectSD(void)
char * getBrightness(u32 screen) char * getBrightness(u32 screen)
{ {
u32 brightness = 0; u32 brightness = 0;
static char level[5];
if(R_SUCCEEDED(gspLcdInit())) if(R_SUCCEEDED(gspLcdInit()))
{ {
if (R_SUCCEEDED(GSPLCD_GetBrightness(screen, &brightness))) if (R_SUCCEEDED(GSPLCD_GetBrightness(screen, &brightness)))
gspLcdExit(); gspLcdExit();
} }
if (brightness == 0x10) snprintf(level, 5, "%d%%", (int)brightness);
return "1 (20%)";
else if (brightness == 0x1C) return level;
return "2 (40%)";
else if (brightness == 0x30)
return "3 (60%)";
else if (brightness == 0x52)
return "4 (80%)";
else if (brightness == 0x8E)
return "5 (100%)";
else
return "n3DS only";
} }