Skip to content

Commit

Permalink
Show button press on LED.
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Rohloff <[email protected]>
  • Loading branch information
V10lator authored and GaryOderNichts committed Sep 19, 2023
1 parent c1119d9 commit 449f5aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios_mcp/source/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,14 @@ int drawMenu(const char* title, const Menu* menu, size_t count,
SMC_ReadSystemEventFlag(&flag);
if (cur_flag != flag) {
if (flag & SYSTEM_EVENT_FLAG_EJECT_BUTTON) {
setNotificationLED(NOTIF_LED_OFF, 250);
prev_selected = selected;
selected++;
if (selected == count)
selected = 0;
redraw = 1;
} else if (flag & SYSTEM_EVENT_FLAG_POWER_BUTTON) {
setNotificationLED(NOTIF_LED_OFF, 250);
return selected;
}
cur_flag = flag;
Expand Down Expand Up @@ -201,6 +203,7 @@ void waitButtonInput(void)
SMC_ReadSystemEventFlag(&flag);
if (cur_flag != flag) {
if ((flag & SYSTEM_EVENT_FLAG_EJECT_BUTTON) || (flag & SYSTEM_EVENT_FLAG_POWER_BUTTON)) {
setNotificationLED(NOTIF_LED_OFF, 250);
return;
}

Expand Down

0 comments on commit 449f5aa

Please sign in to comment.