From fa82818ad22ecf525f9c10c2abf33c4e798c2392 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 24 Oct 2015 23:13:11 +0200 Subject: [PATCH] (Zarch) Remember last header selection --- menu/drivers/zarch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 87ee462df2..d877a1efb1 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -1166,6 +1166,7 @@ static int zarch_iterate(enum menu_action action) int ret = 0; menu_entry_t entry; zui_t *zui = NULL; + static ssize_t header_selection_last = 0; menu_handle_t *menu = menu_driver_get_ptr(); enum menu_action act = (enum menu_action)action; bool perform_action = true; @@ -1204,13 +1205,14 @@ static int zarch_iterate(enum menu_action action) case MENU_ACTION_UP: if (zui->entries_selection == 0) { - zui->header_selection = 0; + zui->header_selection = header_selection_last; perform_action = false; break; } case MENU_ACTION_DOWN: if (zui->header_selection != -1) { + header_selection_last = zui->header_selection; zui->header_selection = -1; zui->entries_selection = 0; perform_action = false;