From 050a6b95718066038c4dedd91e6719368539b022 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 12 Sep 2014 05:57:27 +0200 Subject: [PATCH] (Lakka) Only perform menu actions if MENU_ACTION_LEFT/MENU_ACTION_RIGHT/ MENU_ACTION_START/MENU_ACTION_OK is pressed --- frontend/menu/backend/menu_lakka_backend.c | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/frontend/menu/backend/menu_lakka_backend.c b/frontend/menu/backend/menu_lakka_backend.c index 2158828441..43677b3804 100644 --- a/frontend/menu/backend/menu_lakka_backend.c +++ b/frontend/menu/backend/menu_lakka_backend.c @@ -297,15 +297,25 @@ static int menu_lakka_iterate(unsigned action) if (action && depth == 1 && menu_active_category == 0 && active_subitem->setting) { - if (active_subitem->setting->type == ST_BOOL) - menu_common_setting_set_current_boolean( - active_subitem->setting, action); - else if (active_subitem->setting->type == ST_UINT) - menu_common_setting_set_current_unsigned_integer( - active_subitem->setting, 0, action); - else if (active_subitem->setting->type == ST_FLOAT) - menu_common_setting_set_current_fraction( - active_subitem->setting, action); + switch (action) + { + case MENU_ACTION_LEFT: + case MENU_ACTION_RIGHT: + case MENU_ACTION_OK: + case MENU_ACTION_START: + if (active_subitem->setting->type == ST_BOOL) + menu_common_setting_set_current_boolean( + active_subitem->setting, action); + else if (active_subitem->setting->type == ST_UINT) + menu_common_setting_set_current_unsigned_integer( + active_subitem->setting, 0, action); + else if (active_subitem->setting->type == ST_FLOAT) + menu_common_setting_set_current_fraction( + active_subitem->setting, action); + break; + default: + break; + } } switch (action)