File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ SELECT+Y - Dump hardware frame output to `/3ds/open_agb_firm/screenshots/YYYY_MM
3333* The file name is the current date and time from your real-time clock.
3434* If the screen output freezes, press HOME to fix it. This is a hard to track down bug that will be fixed.
3535
36- Y+DOWN - Turn off the power LED
36+ START+Y - Toggle power LED on/off.
3737
3838X+UP/DOWN - Adjust screen brightness up or down by ` backlightSteps ` units.
3939
Original file line number Diff line number Diff line change 4141
4242
4343static KHandle g_frameReadyEvent = 0 ;
44-
44+ static PwrLedPattern g_lastPowerLEDPattern = MCU_PWR_LED_AUTO ;
4545
4646
4747static u32 fixRomPadding (const u32 romFileSize )
@@ -122,9 +122,19 @@ void changeBacklight(s16 amount)
122122 GFX_setLcdLuminance (newVal );
123123}
124124
125- void turnOffPowerLED ()
125+ void togglePowerLED ()
126126{
127- MCU_setPowerLedPattern (MCU_PWR_LED_OFF );
127+ PwrLedPattern currentPattern = MCU_getPowerLedPattern ();
128+ if (currentPattern == MCU_PWR_LED_OFF )
129+ {
130+ // Restore last know pattern.
131+ MCU_setPowerLedPattern (g_lastPowerLEDPattern );
132+ }
133+ else
134+ {
135+ MCU_setPowerLedPattern (MCU_PWR_LED_OFF );
136+ }
137+ g_lastPowerLEDPattern = currentPattern ;
128138}
129139
130140static void updateBacklight (void )
@@ -134,9 +144,9 @@ static void updateBacklight(void)
134144 static bool backlightOn = true;
135145 if (hidKeysDown () && kHeld )
136146 {
137- // Turn off power LED
138- if (kHeld == (KEY_Y | KEY_DDOWN ))
139- turnOffPowerLED ();
147+ // Toggle power LED.
148+ if (kHeld == (KEY_Y | KEY_START ))
149+ togglePowerLED ();
140150
141151 // Adjust LCD brightness up.
142152 const s16 steps = g_oafConfig .backlightSteps ;
You can’t perform that action at this time.
0 commit comments