From a3adec94176be20f15b9dbe9a6b1dcc10b7b2c65 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 24 Oct 2015 23:08:44 +0200 Subject: [PATCH] Can now toggle tabs with gamepad --- menu/drivers/zarch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 9c94a830d2..87ee462df2 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -544,9 +544,9 @@ static bool zui_tab(zui_t *zui, zui_tabbed_t *tab, const char *label, bool selec y1 = tab->y; x2 = x1 + width; y2 = y1 + 60; - active = check_button_up(zui, id, x1, y1, x2, y2) || selected; + active = check_button_up(zui, id, x1, y1, x2, y2); - if (zui->item.active == id || tab->active == ~0) + if (zui->item.active == id || tab->active == ~0 || selected) tab->active = id; if (selected) @@ -562,7 +562,7 @@ static bool zui_tab(zui_t *zui, zui_tabbed_t *tab, const char *label, bool selec else tab->x = x2; - return (active || (tab->active == id)); + return (active || (tab->active == id) || selected); }