Skip to content

Commit 5124d75

Browse files
committed
menu: toggle Menu Widgets without a full driver reinit too
menu_enable_widgets ("Use Menu Widgets") fired CMD_EVENT_REINIT on change, reinitialising every driver just to enable/disable the gfx_widgets system. Its only consumer is the widget-enable block in drivers_init(), which the new CMD_EVENT_OSD_NOTIFICATION_TOGGLE handler already re-evaluates (it reads menu_enable_widgets in its want_widgets test). Point this setting at that command as well, so toggling widgets is instant instead of flashing a context reinit. Same runtime-widget-lifecycle caveat as the notifications toggle applies. Signed-off-by: LibretroAdmin <LibretroAdmin@users.noreply.github.com>
1 parent 7292e0c commit 5124d75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

menu/menu_setting.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17039,7 +17039,7 @@ static bool setting_append_list(
1703917039
{
1704017040
static const setting_desc_t osn_desc_0[] = {
1704117041
SDESC_BOOL_ROW_EX(menu_enable_widgets, MENU_WIDGETS_ENABLE,
17042-
DEFAULT_MENU_ENABLE_WIDGETS, SD_FLAG_NONE, 0, CMD_EVENT_REINIT,
17042+
DEFAULT_MENU_ENABLE_WIDGETS, SD_FLAG_NONE, 0, CMD_EVENT_OSD_NOTIFICATION_TOGGLE,
1704317043
setting_bool_action_left_with_refresh, NULL, NULL, NULL, setting_bool_action_left_with_refresh, setting_bool_action_right_with_refresh, 0),
1704417044
SDESC_BOOL_ROW_EX(menu_widget_scale_auto, MENU_WIDGET_SCALE_AUTO,
1704517045
DEFAULT_MENU_WIDGET_SCALE_AUTO, SD_FLAG_NONE, 0, 0,

0 commit comments

Comments
 (0)