From 7e2aafa382e9683022056be6da7f535764cf01cc Mon Sep 17 00:00:00 2001 From: orbea Date: Mon, 24 Dec 2018 18:07:48 -0800 Subject: [PATCH] menu: Reset initial menu position after selecting a core. Fixes https://github.com/libretro/RetroArch/issues/2506 (Again) v2: Only reset the menu posiition after selecting a core and not when just toggling the menu. --- menu/menu_displaylist.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index cdf3fda1ce..b7dee77bfd 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -4296,6 +4296,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist menu_handle_t *menu = NULL; bool load_content = true; bool use_filebrowser = false; + static bool core_selected = false; unsigned count = 0; int ret = 0; @@ -5032,6 +5033,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist info->need_sort = true; info->need_refresh = true; info->need_push = true; + core_selected = true; { unsigned cores_names_len = 0; @@ -7082,6 +7084,13 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist ret = menu_displaylist_parse_horizontal_content_actions(menu, info); info->need_refresh = true; info->need_push = true; + + if (core_selected) + { + info->need_clear = true; + core_selected = false; + } + break; case DISPLAYLIST_CONTENT_SETTINGS: menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);