mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +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*)
|
rarch_setting_t *setting = (rarch_setting_t*)
|
||||||
active_subitem->setting;
|
active_subitem->setting;
|
||||||
|
|
||||||
switch (action)
|
menu_action_handle_setting(setting, 0, 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
|
@ -188,7 +188,7 @@ static int menu_entries_set_current_path_selection(
|
|||||||
return 0;
|
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)
|
unsigned type, unsigned action)
|
||||||
{
|
{
|
||||||
if (!setting)
|
if (!setting)
|
||||||
|
@ -47,6 +47,9 @@ int menu_action_setting_set_current_string_path(
|
|||||||
int menu_action_setting_set(unsigned type, const char *label,
|
int menu_action_setting_set(unsigned type, const char *label,
|
||||||
unsigned action);
|
unsigned action);
|
||||||
|
|
||||||
|
int menu_action_handle_setting(rarch_setting_t *setting,
|
||||||
|
unsigned type, unsigned action);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user