Split up action_up_or_down_handler into two

This commit is contained in:
twinaphex 2015-06-05 18:43:04 +02:00
parent 27a7f66c2a
commit 26650e5d56
2 changed files with 9 additions and 4 deletions

View File

@ -206,9 +206,12 @@ static int setting_handler(rarch_setting_t *setting, unsigned action)
switch (action)
{
case MENU_ACTION_UP:
if (setting->action_up)
return setting->action_up(setting, action);
break;
case MENU_ACTION_DOWN:
if (setting->action_up_or_down)
return setting->action_up_or_down(setting, action);
if (setting->action_down)
return setting->action_down(setting, action);
break;
case MENU_ACTION_LEFT:
case MENU_ACTION_RIGHT:

View File

@ -104,7 +104,8 @@ enum setting_list_flags
typedef void (*change_handler_t )(void *data);
typedef int (*action_toggle_handler_t )(void *data, unsigned action, bool wraparound);
typedef int (*action_up_or_down_handler_t )(void *data, unsigned action);
typedef int (*action_up_handler_t )(void *data, unsigned action);
typedef int (*action_down_handler_t )(void *data, unsigned action);
typedef int (*action_start_handler_t )(void *data);
typedef int (*action_iterate_handler_t )(unsigned action);
typedef int (*action_cancel_handler_t )(void *data, unsigned action);
@ -148,7 +149,8 @@ typedef struct rarch_setting
action_start_handler_t action_start;
action_iterate_handler_t action_iterate;
action_toggle_handler_t action_toggle;
action_up_or_down_handler_t action_up_or_down;
action_up_handler_t action_up;
action_down_handler_t action_down;
action_cancel_handler_t action_cancel;
action_ok_handler_t action_ok;
get_string_representation_t get_string_representation;