mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-01 04:00:32 +00:00
(menu_action.c) Cut down on code duplication
This commit is contained in:
parent
8d4fdd9e24
commit
f518da61bf
@ -143,6 +143,7 @@ int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
case ST_BOOL:
|
||||
case ST_UINT:
|
||||
case ST_FLOAT:
|
||||
case ST_STRING:
|
||||
return setting_handler(setting, action);
|
||||
case ST_PATH:
|
||||
return menu_entries_set_current_path_selection(setting,
|
||||
@ -166,24 +167,6 @@ int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case ST_STRING:
|
||||
switch (action)
|
||||
{
|
||||
case MENU_ACTION_LEFT:
|
||||
case MENU_ACTION_RIGHT:
|
||||
if (setting->action_toggle)
|
||||
setting->action_toggle(setting, action);
|
||||
break;
|
||||
case MENU_ACTION_START:
|
||||
if (setting->action_start)
|
||||
setting->action_start(setting);
|
||||
break;
|
||||
case MENU_ACTION_OK:
|
||||
if (setting->action_ok)
|
||||
setting->action_ok(setting, action);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user