Merge pull request #7817 from orbea/clear

menu: Reset initial menu position after selecting a core.
This commit is contained in:
Twinaphex 2019-01-05 17:17:16 +01:00 committed by GitHub
commit e70806c51c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4326,6 +4326,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;
@ -5062,6 +5063,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;
@ -7112,6 +7114,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);