mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-01 04:00:32 +00:00
Refactor Lakka action code
This commit is contained in:
parent
bb3caf7005
commit
5636414e31
@ -359,27 +359,7 @@ static int menu_lakka_iterate(unsigned action)
|
||||
rarch_setting_t *setting = (rarch_setting_t*)
|
||||
active_subitem->setting;
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case MENU_ACTION_OK:
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
setting->cmd_trigger.triggered = true;
|
||||
/* fall-through */
|
||||
case MENU_ACTION_LEFT:
|
||||
case MENU_ACTION_RIGHT:
|
||||
case MENU_ACTION_START:
|
||||
if (setting->type == ST_BOOL)
|
||||
menu_action_setting_boolean(setting, action);
|
||||
else if (setting->type == ST_UINT)
|
||||
menu_action_setting_unsigned_integer(setting, action);
|
||||
else if (setting->type == ST_FLOAT)
|
||||
menu_action_setting_fraction(setting, action);
|
||||
else if (setting->type == ST_STRING)
|
||||
menu_action_setting_driver(setting, action);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
menu_action_handle_setting(setting, 0, action);
|
||||
}
|
||||
|
||||
switch (action)
|
||||
|
@ -188,7 +188,7 @@ static int menu_entries_set_current_path_selection(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
unsigned type, unsigned action)
|
||||
{
|
||||
if (!setting)
|
||||
|
@ -47,6 +47,9 @@ int menu_action_setting_set_current_string_path(
|
||||
int menu_action_setting_set(unsigned type, const char *label,
|
||||
unsigned action);
|
||||
|
||||
int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
unsigned type, unsigned action);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user