This commit is contained in:
twinaphex 2019-05-13 03:36:59 +02:00
parent 3d678bbafe
commit c729748276
5 changed files with 12 additions and 72 deletions

View File

@ -61,7 +61,6 @@ static void menu_action_setting_audio_mixer_stream_name(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -81,7 +80,6 @@ static void menu_action_setting_audio_mixer_stream_volume(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -101,7 +99,6 @@ static void menu_action_setting_disp_set_label_cheat_num_passes(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -115,7 +112,6 @@ static void menu_action_setting_disp_set_label_cheevos_locked_entry(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -130,7 +126,6 @@ static void menu_action_setting_disp_set_label_cheevos_unlocked_entry(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -145,7 +140,6 @@ static void menu_action_setting_disp_set_label_cheevos_unlocked_entry_hardcore(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -160,7 +154,6 @@ static void menu_action_setting_disp_set_label_remap_file_load(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -178,7 +171,6 @@ static void menu_action_setting_disp_set_label_configurations(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -197,7 +189,6 @@ static void menu_action_setting_disp_set_label_shader_filter_pass(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -234,7 +225,6 @@ static void menu_action_setting_disp_set_label_netplay_mitm_server(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -265,7 +255,6 @@ static void menu_action_setting_disp_set_label_shader_watch_for_changes(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -289,7 +278,6 @@ static void menu_action_setting_disp_set_label_shader_num_passes(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -307,7 +295,6 @@ static void menu_action_setting_disp_set_label_shader_pass(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -332,7 +319,6 @@ static void menu_action_setting_disp_set_label_shader_default_filter(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -355,7 +341,6 @@ static void menu_action_setting_disp_set_label_shader_parameter(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -386,7 +371,6 @@ static void menu_action_setting_disp_set_label_shader_preset_parameter(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -409,7 +393,6 @@ static void menu_action_setting_disp_set_label_shader_scale_pass(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -441,7 +424,6 @@ static void menu_action_setting_disp_set_label_menu_file_core(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -461,7 +443,6 @@ static void menu_action_setting_disp_set_label_input_desc(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -510,7 +491,6 @@ static void menu_action_setting_disp_set_label_input_desc_kbd(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -552,7 +532,6 @@ static void menu_action_setting_disp_set_label_cheat(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -586,7 +565,6 @@ static void menu_action_setting_disp_set_label_cheat_match(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -640,7 +618,6 @@ static void menu_action_setting_disp_set_label_perf_counters(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -655,7 +632,6 @@ static void menu_action_setting_disp_set_label_libretro_perf_counters(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -670,7 +646,6 @@ static void menu_action_setting_disp_set_label_menu_more(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -685,7 +660,6 @@ static void menu_action_setting_disp_set_label_db_entry(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -700,7 +674,6 @@ static void menu_action_setting_disp_set_label_entry_url(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -720,7 +693,6 @@ static void menu_action_setting_disp_set_label_entry(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -734,7 +706,6 @@ static void menu_action_setting_disp_set_label_wifi_is_online(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -750,7 +721,6 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -789,7 +759,6 @@ static void menu_action_setting_disp_set_label_menu_video_resolution(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -832,7 +801,6 @@ static void menu_action_setting_disp_set_label_menu_file_plain(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -845,7 +813,6 @@ static void menu_action_setting_disp_set_label_menu_file_imageviewer(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -858,7 +825,6 @@ static void menu_action_setting_disp_set_label_movie(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -871,7 +837,6 @@ static void menu_action_setting_disp_set_label_music(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -884,7 +849,6 @@ static void menu_action_setting_disp_set_label_menu_file_use_directory(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -897,7 +861,6 @@ static void menu_action_setting_disp_set_label_menu_file_directory(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -910,7 +873,6 @@ static void menu_action_setting_disp_set_label_menu_file_parent_directory(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -923,7 +885,6 @@ static void menu_action_setting_disp_set_label_menu_file_carchive(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -936,7 +897,6 @@ static void menu_action_setting_disp_set_label_menu_file_shader(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -949,7 +909,6 @@ static void menu_action_setting_disp_set_label_menu_file_shader_preset(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -962,7 +921,6 @@ static void menu_action_setting_disp_set_label_menu_file_in_carchive(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -975,7 +933,6 @@ static void menu_action_setting_disp_set_label_menu_file_overlay(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -989,7 +946,6 @@ static void menu_action_setting_disp_set_label_menu_file_video_layout(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1003,7 +959,6 @@ static void menu_action_setting_disp_set_label_menu_file_config(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1016,7 +971,6 @@ static void menu_action_setting_disp_set_label_menu_file_font(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1029,7 +983,6 @@ static void menu_action_setting_disp_set_label_menu_file_filter(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1042,7 +995,6 @@ static void menu_action_setting_disp_set_label_menu_file_url_core(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1062,7 +1014,6 @@ static void menu_action_setting_disp_set_label_menu_file_rdb(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1075,7 +1026,6 @@ static void menu_action_setting_disp_set_label_menu_file_cursor(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1088,7 +1038,6 @@ static void menu_action_setting_disp_set_label_menu_file_cheat(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1101,7 +1050,6 @@ static void menu_action_setting_disp_set_label_core_option_create(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1120,7 +1068,6 @@ static void menu_action_setting_disp_set_label_playlist_associations(file_list_t
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1178,7 +1125,6 @@ static void menu_action_setting_disp_set_label_core_options(file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1207,7 +1153,6 @@ static void menu_action_setting_disp_set_label_achievement_information(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1215,7 +1160,7 @@ static void menu_action_setting_disp_set_label_achievement_information(
*w = 2;
menu_setting_get_label(list, s,
len, w, type, label, entry_label, i);
len, w, type, label, i);
strlcpy(s2, path, len2);
}
@ -1225,7 +1170,6 @@ static void menu_action_setting_disp_set_label_no_items(
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1239,7 +1183,6 @@ static void menu_action_setting_disp_set_label(file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1247,7 +1190,7 @@ static void menu_action_setting_disp_set_label(file_list_t* list,
*w = 19;
menu_setting_get_label(list, s,
len, w, type, label, entry_label, i);
len, w, type, label, i);
strlcpy(s2, path, len2);
}
@ -1256,7 +1199,6 @@ static void menu_action_setting_disp_set_label_setting_bool(file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1280,7 +1222,6 @@ static void menu_action_setting_disp_set_label_setting_string(file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{
@ -1298,7 +1239,6 @@ static void menu_action_setting_disp_set_label_setting_path(file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *entry_label,
const char *path,
char *s2, size_t len2)
{

View File

@ -378,7 +378,12 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
file_list_get_at_offset(list, i, &path, &entry_label, &entry->type,
&entry->entry_idx);
cbs = (menu_file_list_cbs_t*)file_list_get_actiondata_at_offset(list, i);
cbs = (menu_file_list_cbs_t*)
file_list_get_actiondata_at_offset(list, i);
entry->idx = (unsigned)i;
if (!string_is_empty(entry_label))
entry->label = strdup(entry_label);
if (cbs)
{
@ -400,7 +405,7 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
(unsigned)i, label,
tmp,
sizeof(tmp),
entry_label, path,
path,
newpath,
sizeof(newpath)
);
@ -440,8 +445,6 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
}
}
entry->idx = (unsigned)i;
if (!string_is_empty(path) && !use_representation)
strlcpy(newpath, path, sizeof(newpath));
else if (cbs && cbs->setting && cbs->setting->enum_value_idx != MSG_UNKNOWN
@ -453,8 +456,6 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
if (!string_is_empty(newpath))
entry->path = strdup(newpath);
if (!string_is_empty(entry_label))
entry->label = strdup(entry_label);
}
bool menu_entry_is_currently_selected(unsigned id)

View File

@ -136,7 +136,6 @@ typedef struct menu_file_list_cbs
void (*action_get_value)(file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label, char *s, size_t len,
const char *entry_label,
const char *path,
char *path_buf, size_t path_buf_size);
} menu_file_list_cbs_t;

View File

@ -5495,10 +5495,10 @@ static void get_string_representation_bind_device(rarch_setting_t *setting, char
**/
void menu_setting_get_label(file_list_t *list, char *s,
size_t len, unsigned *w, unsigned type,
const char *menu_label, const char *label, unsigned idx)
const char *menu_label, unsigned idx)
{
rarch_setting_t *setting = NULL;
if (!list || !label)
if (!list)
return;
setting = menu_setting_find(list->list[idx].label);

View File

@ -119,7 +119,7 @@ void menu_setting_get_string_representation(rarch_setting_t *setting, char *s, s
**/
void menu_setting_get_label(file_list_t *list, char *s,
size_t len, unsigned *w, unsigned type,
const char *menu_label, const char *label, unsigned idx);
const char *menu_label, unsigned idx);
int menu_action_handle_setting(rarch_setting_t *setting,
unsigned type, unsigned action, bool wraparound);