Create menu_setting_action_right

This commit is contained in:
twinaphex 2015-10-11 14:26:30 +02:00
parent 2f12ddde32
commit b13ccb6009
3 changed files with 11 additions and 2 deletions

View File

@ -197,7 +197,7 @@ void menu_entry_pathdir_selected(uint32_t i)
{ {
rarch_setting_t *setting = menu_entry_get_setting(i); rarch_setting_t *setting = menu_entry_get_setting(i);
if (menu_setting_is_of_path_type(setting)) if (menu_setting_is_of_path_type(setting))
setting->action_right(setting, false); menu_setting_action_right(setting, false);
} }
bool menu_entry_pathdir_allow_empty(uint32_t i) bool menu_entry_pathdir_allow_empty(uint32_t i)

View File

@ -6446,6 +6446,14 @@ static bool setting_append_list_input_player_options(
return true; return true;
} }
bool menu_setting_action_right(rarch_setting_t *setting, bool wraparound)
{
if (!setting || !setting->action_right)
return false;
setting->action_right(setting, wraparound);
return true;
}
void menu_setting_free(rarch_setting_t *list) void menu_setting_free(rarch_setting_t *list)
{ {
@ -6702,4 +6710,3 @@ error:
return NULL; return NULL;
} }

View File

@ -308,6 +308,8 @@ unsigned setting_get_index_offset(rarch_setting_t *setting);
void *setting_get_ptr(rarch_setting_t *setting); void *setting_get_ptr(rarch_setting_t *setting);
bool menu_setting_action_right(rarch_setting_t *setting, bool wraparound);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif