mirror of
https://github.com/joel16/3DSident.git
synced 2024-11-23 03:29:45 +00:00
Display brightness explicitly
This commit is contained in:
parent
c4fe6742a1
commit
fb02508df6
@ -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";
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user