Added ability to turn screen on and off

This commit is contained in:
spitzeqc 2022-06-22 22:59:57 -04:00 committed by profi200
parent 56bf27a026
commit 6b5abf383d
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,8 @@ SELECT+Y - Dump screen output to `/3ds/open_agb_firm/texture_dump.bmp`
* If the screen output freezes, press HOME to fix it. This is a hard to track down bug that will be fixed.
X+UP/DOWN - Adjust screen brightness up or down by `backlightAdjustment` units
X+LEFT - Turn off (both) screens
X+RIGHT - Turn on (both) screens
Hold the power button to turn off the 3DS.

View File

@ -564,6 +564,12 @@ static void gbaGfxHandler(void *args)
//adjust screen brightness down
if(hidKeysHeld() == (KEY_X | KEY_DDOWN) && hidKeysDown() != 0)
brightnessDown();
//turn off screen
if(hidKeysHeld() == (KEY_X | KEY_DLEFT) && hidKeysDown() != 0)
GFX_setBrightness(0, 0);
//turn on screen
if(hidKeysHeld() == (KEY_X | KEY_DRIGHT) && hidKeysDown() != 0)
GFX_setBrightness(currentBacklight, currentBacklight);
}
taskExit();