(menu_action.c) Cut down on code duplication

This commit is contained in:
twinaphex 2014-10-17 01:37:17 +02:00
parent 8d4fdd9e24
commit f518da61bf

View File

@ -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;
}