mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
parent
a07ada7af6
commit
a276710877
@ -22,14 +22,13 @@
|
||||
cbs->action_content_list_switch_ident = #name;
|
||||
#endif
|
||||
|
||||
static int deferred_push_content_list(void *data,
|
||||
void *data2, void *userdata,
|
||||
static int deferred_push_content_list(void *data, void *userdata,
|
||||
const char *path,
|
||||
const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
menu_navigation_set_selection(0);
|
||||
return action_refresh_default(data, (file_list_t*)data2, selection_buf);
|
||||
return action_refresh_default((file_list_t*)data, selection_buf);
|
||||
}
|
||||
|
||||
int menu_cbs_init_bind_content_list_switch(menu_file_list_cbs_t *cbs,
|
||||
|
@ -309,8 +309,7 @@ static int generic_shader_action_parameter_left(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int shader_action_parameter_left(void *data,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
static int shader_action_parameter_left(unsigned type, const char *label, bool wraparound)
|
||||
{
|
||||
video_shader_ctx_t shader_info;
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
@ -334,8 +333,7 @@ static int shader_action_parameter_left(void *data,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int action_left_cheat(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_cheat(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
size_t idx = type - MENU_SETTINGS_CHEAT_BEGIN;
|
||||
@ -343,9 +341,8 @@ static int action_left_cheat(void *data,
|
||||
wraparound);
|
||||
}
|
||||
|
||||
static int action_left_input_desc(void *data,
|
||||
unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
static int action_left_input_desc(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -373,14 +370,13 @@ static int action_left_input_desc(void *data,
|
||||
also skip all the axes until analog remapping is implemented */
|
||||
if ((string_is_empty(system->input_desc_btn[user_idx][remap_idx]) && remap_idx < RARCH_CUSTOM_BIND_LIST_END) /*||
|
||||
(remap_idx >= RARCH_FIRST_CUSTOM_BIND && remap_idx < RARCH_CUSTOM_BIND_LIST_END)*/)
|
||||
action_left_input_desc(data,type, label, wraparound);
|
||||
action_left_input_desc(type, label, wraparound);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_input_desc_kbd(void *data,
|
||||
unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
static int action_left_input_desc_kbd(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned remap_id;
|
||||
unsigned key_id, id, offset;
|
||||
@ -415,8 +411,7 @@ static int action_left_input_desc_kbd(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_scroll(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_scroll(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
size_t scroll_accel = 0;
|
||||
@ -444,15 +439,14 @@ static int action_left_scroll(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_mainmenu(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_mainmenu(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
unsigned push_list = 0;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
menu_handle_t *menu = NULL;
|
||||
|
||||
if (!menu)
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return menu_cbs_exit();
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_GET_SELECTION, &list_info);
|
||||
@ -491,12 +485,12 @@ static int action_left_mainmenu(void *data,
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_CACHE, &list_info);
|
||||
|
||||
if (cbs && cbs->action_content_list_switch)
|
||||
return cbs->action_content_list_switch(menu,
|
||||
return cbs->action_content_list_switch(
|
||||
selection_buf, menu_stack, "", "", 0);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
action_left_scroll(data, 0, "", false);
|
||||
action_left_scroll(0, "", false);
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
@ -506,8 +500,7 @@ static int action_left_mainmenu(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_shader_scale_pass(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_shader_scale_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned current_scale, delta;
|
||||
@ -529,8 +522,7 @@ static int action_left_shader_scale_pass(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_shader_filter_pass(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_shader_filter_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned delta = 2;
|
||||
@ -545,8 +537,7 @@ static int action_left_shader_filter_pass(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_shader_filter_default(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_shader_filter_default(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = menu_setting_find_enum(
|
||||
@ -557,8 +548,7 @@ static int action_left_shader_filter_default(void *data,
|
||||
setting_get_type(setting), MENU_ACTION_LEFT, wraparound);
|
||||
}
|
||||
|
||||
static int action_left_cheat_num_passes(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_cheat_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
bool refresh = false;
|
||||
@ -573,8 +563,7 @@ static int action_left_cheat_num_passes(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_shader_num_passes(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_shader_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
bool refresh = false;
|
||||
@ -594,8 +583,7 @@ static int action_left_shader_num_passes(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_netplay_mitm_server(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_netplay_mitm_server(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -612,17 +600,13 @@ static int action_left_netplay_mitm_server(void *data,
|
||||
if (i - 1 >= 0)
|
||||
{
|
||||
found = true;
|
||||
strlcpy(settings->arrays.netplay_mitm_server,
|
||||
netplay_mitm_server_list[i - 1].name,
|
||||
sizeof(settings->arrays.netplay_mitm_server));
|
||||
strlcpy(settings->arrays.netplay_mitm_server, netplay_mitm_server_list[i - 1].name, sizeof(settings->arrays.netplay_mitm_server));
|
||||
break;
|
||||
}
|
||||
else if (wraparound)
|
||||
{
|
||||
found = true;
|
||||
strlcpy(settings->arrays.netplay_mitm_server,
|
||||
netplay_mitm_server_list[list_len - 1].name,
|
||||
sizeof(settings->arrays.netplay_mitm_server));
|
||||
strlcpy(settings->arrays.netplay_mitm_server, netplay_mitm_server_list[list_len - 1].name, sizeof(settings->arrays.netplay_mitm_server));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -631,16 +615,13 @@ static int action_left_netplay_mitm_server(void *data,
|
||||
if (!found)
|
||||
{
|
||||
/* current entry was invalid, go back to the end */
|
||||
strlcpy(settings->arrays.netplay_mitm_server,
|
||||
netplay_mitm_server_list[list_len - 1].name,
|
||||
sizeof(settings->arrays.netplay_mitm_server));
|
||||
strlcpy(settings->arrays.netplay_mitm_server, netplay_mitm_server_list[list_len - 1].name, sizeof(settings->arrays.netplay_mitm_server));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_shader_watch_for_changes(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_shader_watch_for_changes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -648,16 +629,14 @@ static int action_left_shader_watch_for_changes(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_video_resolution(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_left_video_resolution(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
video_driver_get_prev_video_out();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int playlist_association_left(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int playlist_association_left(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned i;
|
||||
@ -720,8 +699,7 @@ static int playlist_association_left(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int core_setting_left(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int core_setting_left(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
@ -731,16 +709,14 @@ static int core_setting_left(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int disk_options_disk_idx_left(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int disk_options_disk_idx_left(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
command_event(CMD_EVENT_DISK_PREV, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bind_left_generic(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int bind_left_generic(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
return menu_setting_set(type, label, MENU_ACTION_LEFT, wraparound);
|
||||
|
@ -22,18 +22,16 @@
|
||||
cbs->action_refresh_ident = #name;
|
||||
#endif
|
||||
|
||||
int action_refresh_default(void *data,
|
||||
file_list_t *list, file_list_t *menu_list)
|
||||
int action_refresh_default(file_list_t *list, file_list_t *menu_list)
|
||||
{
|
||||
menu_displaylist_ctx_entry_t entry;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!menu_list)
|
||||
return -1;
|
||||
|
||||
entry.list = list;
|
||||
entry.stack = menu_list;
|
||||
|
||||
if (!menu_displaylist_push(&entry, menu))
|
||||
if (!menu_displaylist_push(&entry))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
#ifndef BIND_ACTION_RIGHT
|
||||
#define BIND_ACTION_RIGHT(cbs, name) \
|
||||
do { \
|
||||
cbs->action_right = name; \
|
||||
cbs->action_right = name; \
|
||||
cbs->action_right_ident = #name; \
|
||||
} while(0)
|
||||
#endif
|
||||
@ -61,8 +61,7 @@ static int generic_shader_action_parameter_right(struct video_shader_parameter *
|
||||
return 0;
|
||||
}
|
||||
|
||||
int shader_action_parameter_right(void *data,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
int shader_action_parameter_right(unsigned type, const char *label, bool wraparound)
|
||||
{
|
||||
video_shader_ctx_t shader_info;
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
@ -94,8 +93,7 @@ int generic_action_cheat_toggle(size_t idx, unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int action_right_cheat(void *data,
|
||||
unsigned type, const char *label,
|
||||
int action_right_cheat(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
size_t idx = type - MENU_SETTINGS_CHEAT_BEGIN;
|
||||
@ -103,8 +101,7 @@ int action_right_cheat(void *data,
|
||||
wraparound);
|
||||
}
|
||||
|
||||
int action_right_input_desc_kbd(void *data,
|
||||
unsigned type, const char *label,
|
||||
int action_right_input_desc_kbd(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned key_id, id, offset;
|
||||
@ -143,8 +140,7 @@ int action_right_input_desc_kbd(void *data,
|
||||
}
|
||||
|
||||
/* fix-me: incomplete, lacks error checking */
|
||||
int action_right_input_desc(void *data,
|
||||
unsigned type, const char *label,
|
||||
int action_right_input_desc(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
@ -170,7 +166,7 @@ int action_right_input_desc(void *data,
|
||||
also skip all the axes until analog remapping is implemented */
|
||||
if ((string_is_empty(system->input_desc_btn[user_idx][remap_idx]) && remap_idx < RARCH_CUSTOM_BIND_LIST_END) /*||
|
||||
(remap_idx >= RARCH_FIRST_CUSTOM_BIND && remap_idx < RARCH_CUSTOM_BIND_LIST_END)*/)
|
||||
action_right_input_desc(data, type, label, wraparound);
|
||||
action_right_input_desc(type, label, wraparound);
|
||||
|
||||
#if 0
|
||||
int i = 0;
|
||||
@ -182,8 +178,7 @@ int action_right_input_desc(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_scroll(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_scroll(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
size_t scroll_accel = 0;
|
||||
@ -212,7 +207,7 @@ static int action_right_scroll(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_goto_tab(menu_handle_t *menu)
|
||||
static int action_right_goto_tab(void)
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
@ -227,14 +222,13 @@ static int action_right_goto_tab(menu_handle_t *menu)
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_CACHE, &list_info);
|
||||
|
||||
if (cbs && cbs->action_content_list_switch)
|
||||
return cbs->action_content_list_switch(menu, selection_buf, menu_stack,
|
||||
return cbs->action_content_list_switch(selection_buf, menu_stack,
|
||||
"", "", 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_mainmenu(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_mainmenu(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
@ -259,16 +253,15 @@ static int action_right_mainmenu(void *data,
|
||||
|
||||
if ((list_info.selection != (list_horiz_info.size + list_tabs_info.size))
|
||||
|| settings->bools.menu_navigation_wraparound_enable)
|
||||
return action_right_goto_tab((menu_handle_t*)data);
|
||||
return action_right_goto_tab();
|
||||
}
|
||||
else
|
||||
action_right_scroll(data, 0, "", false);
|
||||
action_right_scroll(0, "", false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_shader_scale_pass(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_shader_scale_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned current_scale, delta;
|
||||
@ -289,8 +282,7 @@ static int action_right_shader_scale_pass(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_shader_filter_pass(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_shader_filter_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
||||
@ -305,8 +297,7 @@ static int action_right_shader_filter_pass(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_shader_filter_default(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_shader_filter_default(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = menu_setting_find_enum(MENU_ENUM_LABEL_VIDEO_SMOOTH);
|
||||
@ -317,13 +308,13 @@ static int action_right_shader_filter_default(void *data,
|
||||
wraparound);
|
||||
}
|
||||
|
||||
static int action_right_cheat_num_passes(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_cheat_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
bool refresh = false;
|
||||
unsigned new_size = cheat_manager_get_size() + 1;
|
||||
unsigned new_size = 0;
|
||||
|
||||
new_size = cheat_manager_get_size() + 1;
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||
cheat_manager_realloc(new_size);
|
||||
@ -331,8 +322,7 @@ static int action_right_cheat_num_passes(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_shader_num_passes(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_shader_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
bool refresh = false;
|
||||
@ -352,8 +342,7 @@ static int action_right_shader_num_passes(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_netplay_mitm_server(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_netplay_mitm_server(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -391,26 +380,22 @@ static int action_right_netplay_mitm_server(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_shader_watch_for_changes(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_shader_watch_for_changes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
settings->bools.video_shader_watch_files =
|
||||
!settings->bools.video_shader_watch_files;
|
||||
settings->bools.video_shader_watch_files = !settings->bools.video_shader_watch_files;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_video_resolution(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int action_right_video_resolution(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
video_driver_get_next_video_out();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int playlist_association_right(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int playlist_association_right(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
char core_path[PATH_MAX_LENGTH];
|
||||
@ -469,8 +454,7 @@ static int playlist_association_right(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int core_setting_right(void *data,
|
||||
unsigned type, const char *label,
|
||||
int core_setting_right(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
@ -480,8 +464,7 @@ int core_setting_right(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int disk_options_disk_idx_right(void *data,
|
||||
unsigned type, const char *label,
|
||||
static int disk_options_disk_idx_right(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
command_event(CMD_EVENT_DISK_NEXT, NULL);
|
||||
@ -489,8 +472,7 @@ static int disk_options_disk_idx_right(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bind_right_generic(void *data,
|
||||
unsigned type, const char *label,
|
||||
int bind_right_generic(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
return menu_setting_set(type, label, MENU_ACTION_RIGHT, wraparound);
|
||||
|
@ -120,74 +120,47 @@ static int action_select_path_use_directory(const char *path,
|
||||
path, label, type, idx, 0 /* unused */);
|
||||
}
|
||||
|
||||
static int action_select_driver_setting(const char *path,
|
||||
const char *label, unsigned type,
|
||||
static int action_select_driver_setting(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
menu_handle_t *menu = NULL;
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return menu_cbs_exit();
|
||||
return bind_right_generic(menu, type, label, true);
|
||||
return bind_right_generic(type, label, true);
|
||||
}
|
||||
|
||||
static int action_select_core_setting(const char *path,
|
||||
const char *label, unsigned type,
|
||||
static int action_select_core_setting(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
menu_handle_t *menu = NULL;
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return menu_cbs_exit();
|
||||
return core_setting_right(menu, type, label, true);
|
||||
return core_setting_right(type, label, true);
|
||||
}
|
||||
|
||||
static int shader_action_parameter_select(const char *path,
|
||||
const char *label, unsigned type,
|
||||
static int shader_action_parameter_select(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
menu_handle_t *menu = NULL;
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return menu_cbs_exit();
|
||||
return shader_action_parameter_right(menu, type, label, true);
|
||||
return shader_action_parameter_right(type, label, true);
|
||||
}
|
||||
|
||||
static int shader_action_parameter_preset_select(const char *path,
|
||||
const char *label, unsigned type,
|
||||
static int shader_action_parameter_preset_select(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
menu_handle_t *menu = NULL;
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return menu_cbs_exit();
|
||||
return shader_action_parameter_right(menu, type, label, true);
|
||||
return shader_action_parameter_right(type, label, true);
|
||||
}
|
||||
|
||||
static int action_select_cheat(const char *path,
|
||||
const char *label, unsigned type,
|
||||
static int action_select_cheat(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
menu_handle_t *menu = NULL;
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return menu_cbs_exit();
|
||||
return action_right_cheat(menu, type, label, true);
|
||||
return action_right_cheat(type, label, true);
|
||||
}
|
||||
|
||||
static int action_select_input_desc(const char *path,
|
||||
const char *label, unsigned type,
|
||||
static int action_select_input_desc(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
menu_handle_t *menu = NULL;
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return menu_cbs_exit();
|
||||
return action_right_input_desc(menu, type, label, true);
|
||||
return action_right_input_desc(type, label, true);
|
||||
}
|
||||
|
||||
static int action_select_input_desc_kbd(const char *path,
|
||||
const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
menu_handle_t *menu = NULL;
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return menu_cbs_exit();
|
||||
return action_right_input_desc_kbd(menu, type, label, true);
|
||||
return action_right_input_desc_kbd(type, label, true);
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
|
@ -2354,8 +2354,7 @@ static int materialui_pointer_up(void *data,
|
||||
materialui_preswitch_tabs(mui, action);
|
||||
|
||||
if (cbs && cbs->action_content_list_switch)
|
||||
return cbs->action_content_list_switch(data,
|
||||
selection_buf, menu_stack,
|
||||
return cbs->action_content_list_switch(selection_buf, menu_stack,
|
||||
"", "", 0);
|
||||
}
|
||||
}
|
||||
|
@ -129,11 +129,9 @@ enum
|
||||
|
||||
/* Function callbacks */
|
||||
|
||||
int action_refresh_default(void *data,
|
||||
file_list_t *list, file_list_t *menu_list);
|
||||
int action_refresh_default(file_list_t *list, file_list_t *menu_list);
|
||||
|
||||
int shader_action_parameter_right(void *data,
|
||||
unsigned type, const char *label, bool wraparound);
|
||||
int shader_action_parameter_right(unsigned type, const char *label, bool wraparound);
|
||||
|
||||
int generic_action_ok_displaylist_push(void *data,
|
||||
const char *path, const char *new_path,
|
||||
@ -156,16 +154,16 @@ int generic_action_cheat_toggle(size_t idx, unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
|
||||
|
||||
int core_setting_right(void *data, unsigned type, const char *label,
|
||||
int core_setting_right(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
|
||||
int action_right_input_desc(void *data, unsigned type, const char *label,
|
||||
int action_right_input_desc(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
|
||||
int action_right_input_desc_kbd(void *data, unsigned type, const char *label,
|
||||
int action_right_input_desc_kbd(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
|
||||
int action_right_cheat(void *data, unsigned type, const char *label,
|
||||
int action_right_cheat(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
|
||||
int setting_action_ok_video_refresh_rate_auto(void *data, bool wraparound);
|
||||
@ -266,9 +264,8 @@ int action_scan_file(const char *path,
|
||||
const char *label, unsigned type, size_t idx);
|
||||
#endif
|
||||
|
||||
int bind_right_generic(void *data,
|
||||
unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
int bind_right_generic(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
|
||||
/* This sets up all the callback functions for a menu entry.
|
||||
*
|
||||
|
@ -3904,7 +3904,7 @@ static bool menu_displaylist_push_internal(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry, void *data)
|
||||
bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry)
|
||||
{
|
||||
menu_displaylist_info_t info;
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
@ -3913,9 +3913,11 @@ bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry, void *data)
|
||||
unsigned type = 0;
|
||||
bool ret = false;
|
||||
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
menu_handle_t *menu = NULL;
|
||||
|
||||
if (!entry || !menu)
|
||||
if (!entry)
|
||||
return false;
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return false;
|
||||
|
||||
menu_displaylist_info_init(&info);
|
||||
|
@ -218,7 +218,7 @@ typedef struct menu_displaylist_ctx_entry
|
||||
|
||||
bool menu_displaylist_process(menu_displaylist_info_t *info);
|
||||
|
||||
bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry, void *data);
|
||||
bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry);
|
||||
|
||||
void menu_displaylist_info_free(menu_displaylist_info_t *info);
|
||||
|
||||
|
@ -116,15 +116,11 @@ typedef struct menu_file_list_cbs
|
||||
size_t idx);
|
||||
int (*action_start)(unsigned type, const char *label);
|
||||
int (*action_info)(unsigned type, const char *label);
|
||||
int (*action_content_list_switch)(void *data,
|
||||
void *data2, void *userdata, const char
|
||||
int (*action_content_list_switch)(void *data, void *userdata, const char
|
||||
*path, const char *label, unsigned type);
|
||||
int (*action_left)(void *data,
|
||||
unsigned type, const char *label, bool wraparound);
|
||||
int (*action_right)(void *data,
|
||||
unsigned type, const char *label, bool wraparound);
|
||||
int (*action_refresh)(void *data,
|
||||
file_list_t *list, file_list_t *menu_list);
|
||||
int (*action_left)(unsigned type, const char *label, bool wraparound);
|
||||
int (*action_right)(unsigned type, const char *label, bool wraparound);
|
||||
int (*action_refresh)(file_list_t *list, file_list_t *menu_list);
|
||||
int (*action_up)(unsigned type, const char *label);
|
||||
int (*action_label)(file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
|
@ -466,11 +466,11 @@ int menu_entry_action(menu_entry_t *entry,
|
||||
break;
|
||||
case MENU_ACTION_LEFT:
|
||||
if (cbs && cbs->action_left)
|
||||
ret = cbs->action_left(data, entry->type, entry->label, false);
|
||||
ret = cbs->action_left(entry->type, entry->label, false);
|
||||
break;
|
||||
case MENU_ACTION_RIGHT:
|
||||
if (cbs && cbs->action_right)
|
||||
ret = cbs->action_right(data, entry->type, entry->label, false);
|
||||
ret = cbs->action_right(entry->type, entry->label, false);
|
||||
break;
|
||||
case MENU_ACTION_INFO:
|
||||
if (cbs && cbs->action_info)
|
||||
@ -504,7 +504,7 @@ int menu_entry_action(menu_entry_t *entry,
|
||||
bool refresh = false;
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
cbs->action_refresh(data, selection_buf, menu_stack);
|
||||
cbs->action_refresh(selection_buf, menu_stack);
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_UNSET_REFRESH, &refresh);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user