Skip to content

Commit a82db32

Browse files
committed
gfx: refresh the current menu when toggling notifications/widgets
Toggling "On-Screen Notifications" or "Graphics Widgets" can change which dependent entries the current menu should show, and the old CMD_EVENT_REINIT rebuilt the menu implicitly via menu_driver_init(). The lightweight CMD_EVENT_OSD_NOTIFICATION_TOGGLE that replaced it did not, so the list went stale until the user navigated away and back. Flag the menu for a rebuild (ENTRIES_NEED_REFRESH | PREVENT_POPULATE) at the end of the handler, after the widget lifecycle work, so it survives into the next menu iteration -- matching what other refreshing toggles do. Covers both settings, which share this command. Signed-off-by: LibretroAdmin <LibretroAdmin@users.noreply.github.com>
1 parent 4ea5ef9 commit a82db32

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

retroarch.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4022,6 +4022,14 @@ bool command_event(enum event_command cmd, void *data)
40224022
p_dispwidget->active = false;
40234023
}
40244024
}
4025+
#endif
4026+
#ifdef HAVE_MENU
4027+
/* Toggling notifications/widgets can change which dependent entries
4028+
* are shown, so rebuild the current menu list. The old full reinit
4029+
* did this implicitly via menu_driver_init(); set the flag after the
4030+
* widget work so it survives into the next menu iteration. */
4031+
menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH
4032+
| MENU_ST_FLAG_PREVENT_POPULATE;
40254033
#endif
40264034
break;
40274035
case CMD_EVENT_REINIT_FROM_TOGGLE:

0 commit comments

Comments
 (0)