mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 22:38:34 +00:00
Cleanups
This commit is contained in:
parent
0cfeff8e1e
commit
9d9b929ae4
@ -34,7 +34,7 @@ static void menu_action_setting_disp_set_label_cheat_num_passes(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -43,14 +43,14 @@ static void menu_action_setting_disp_set_label_cheat_num_passes(
|
||||
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
snprintf(type_str, type_str_size, "%u", global->cheat->buf_size);
|
||||
snprintf(s, len, "%u", global->cheat->buf_size);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_remap_file_load(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -59,15 +59,15 @@ static void menu_action_setting_disp_set_label_remap_file_load(
|
||||
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
fill_pathname_base(type_str, settings->input.remapping_path,
|
||||
type_str_size);
|
||||
fill_pathname_base(s, settings->input.remapping_path,
|
||||
len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_configurations(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -77,17 +77,17 @@ static void menu_action_setting_disp_set_label_configurations(
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
if (*global->config_path)
|
||||
fill_pathname_base(type_str, global->config_path,
|
||||
type_str_size);
|
||||
fill_pathname_base(s, global->config_path,
|
||||
len);
|
||||
else
|
||||
strlcpy(type_str, "<default>", type_str_size);
|
||||
strlcpy(s, "<default>", len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_shader_filter_pass(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -106,7 +106,7 @@ static void menu_action_setting_disp_set_label_shader_filter_pass(
|
||||
(void)modes;
|
||||
(void)menu;
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
|
||||
@ -116,8 +116,8 @@ static void menu_action_setting_disp_set_label_shader_filter_pass(
|
||||
|
||||
pass = (type - MENU_SETTINGS_SHADER_PASS_FILTER_0);
|
||||
|
||||
strlcpy(type_str, modes[menu->shader->pass[pass].filter],
|
||||
type_str_size);
|
||||
strlcpy(s, modes[menu->shader->pass[pass].filter],
|
||||
len);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -125,28 +125,28 @@ static void menu_action_setting_disp_set_label_filter(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
strlcpy(type_str, "N/A", type_str_size);
|
||||
strlcpy(s, "N/A", len);
|
||||
|
||||
if (*settings->video.softfilter_plugin)
|
||||
strlcpy(type_str, path_basename(settings->video.softfilter_plugin),
|
||||
type_str_size);
|
||||
strlcpy(s, path_basename(settings->video.softfilter_plugin),
|
||||
len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_shader_num_passes(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -157,11 +157,11 @@ static void menu_action_setting_disp_set_label_shader_num_passes(
|
||||
|
||||
(void)menu;
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL)
|
||||
snprintf(type_str, type_str_size, "%u", menu->shader->passes);
|
||||
snprintf(s, len, "%u", menu->shader->passes);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ static void menu_action_setting_disp_set_label_shader_pass(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -182,15 +182,15 @@ static void menu_action_setting_disp_set_label_shader_pass(
|
||||
(void)pass;
|
||||
(void)menu;
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
strlcpy(type_str, "N/A", type_str_size);
|
||||
strlcpy(s, "N/A", len);
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL)
|
||||
if (*menu->shader->pass[pass].source.path)
|
||||
fill_pathname_base(type_str,
|
||||
menu->shader->pass[pass].source.path, type_str_size);
|
||||
fill_pathname_base(s,
|
||||
menu->shader->pass[pass].source.path, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -199,16 +199,16 @@ static void menu_action_setting_disp_set_label_shader_default_filter(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
snprintf(type_str, type_str_size, "%s",
|
||||
snprintf(s, len, "%s",
|
||||
settings->video.smooth ? "Linear" : "Nearest");
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ static void menu_action_setting_disp_set_label_shader_parameter(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -232,7 +232,7 @@ static void menu_action_setting_disp_set_label_shader_parameter(
|
||||
if (!driver->video_data)
|
||||
return;
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
|
||||
@ -247,7 +247,7 @@ static void menu_action_setting_disp_set_label_shader_parameter(
|
||||
if (!param)
|
||||
return;
|
||||
|
||||
snprintf(type_str, type_str_size, "%.2f [%.2f %.2f]",
|
||||
snprintf(s, len, "%.2f [%.2f %.2f]",
|
||||
param->current, param->minimum, param->maximum);
|
||||
#endif
|
||||
}
|
||||
@ -256,7 +256,7 @@ static void menu_action_setting_disp_set_label_shader_preset_parameter(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -270,7 +270,7 @@ static void menu_action_setting_disp_set_label_shader_preset_parameter(
|
||||
|
||||
(void)menu;
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
|
||||
@ -283,7 +283,7 @@ static void menu_action_setting_disp_set_label_shader_preset_parameter(
|
||||
if (!param)
|
||||
return;
|
||||
|
||||
snprintf(type_str, type_str_size, "%.2f [%.2f %.2f]",
|
||||
snprintf(s, len, "%.2f [%.2f %.2f]",
|
||||
param->current, param->minimum, param->maximum);
|
||||
#endif
|
||||
}
|
||||
@ -292,7 +292,7 @@ static void menu_action_setting_disp_set_label_shader_scale_pass(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -303,7 +303,7 @@ static void menu_action_setting_disp_set_label_shader_scale_pass(
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
|
||||
@ -319,9 +319,9 @@ static void menu_action_setting_disp_set_label_shader_scale_pass(
|
||||
scale_value = menu->shader->pass[pass].fbo.scale_x;
|
||||
|
||||
if (!scale_value)
|
||||
strlcpy(type_str, "Don't care", type_str_size);
|
||||
strlcpy(s, "Don't care", len);
|
||||
else
|
||||
snprintf(type_str, type_str_size, "%ux", scale_value);
|
||||
snprintf(s, len, "%ux", scale_value);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -329,15 +329,15 @@ static void menu_action_setting_disp_set_label_menu_file_core(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
const char *alt = NULL;
|
||||
strlcpy(type_str, "(CORE)", type_str_size);
|
||||
strlcpy(s, "(CORE)", len);
|
||||
menu_list_get_alt_at_offset(list, i, &alt);
|
||||
*w = strlen(type_str);
|
||||
*w = strlen(s);
|
||||
if (alt)
|
||||
strlcpy(path_buf, alt, path_buf_size);
|
||||
}
|
||||
@ -346,7 +346,7 @@ static void menu_action_setting_disp_set_label_input_desc(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -361,10 +361,10 @@ static void menu_action_setting_disp_set_label_input_desc(
|
||||
[inp_desc_user][inp_desc_button_index_offset];
|
||||
|
||||
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
|
||||
snprintf(type_str, type_str_size, "%s",
|
||||
snprintf(s, len, "%s",
|
||||
settings->input.binds[inp_desc_user][remap_id].desc);
|
||||
else
|
||||
snprintf(type_str, type_str_size, "%s",
|
||||
snprintf(s, len, "%s",
|
||||
axis_labels[remap_id]);
|
||||
|
||||
*w = 19;
|
||||
@ -375,7 +375,7 @@ static void menu_action_setting_disp_set_label_cheat(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -384,7 +384,7 @@ static void menu_action_setting_disp_set_label_cheat(
|
||||
unsigned cheat_index = type - MENU_SETTINGS_CHEAT_BEGIN;
|
||||
|
||||
if (cheat_index < global->cheat->buf_size)
|
||||
snprintf(type_str, type_str_size, "%s : (%s)",
|
||||
snprintf(s, len, "%s : (%s)",
|
||||
(global->cheat->cheats[cheat_index].code != NULL)
|
||||
? global->cheat->cheats[cheat_index].code : "N/A",
|
||||
global->cheat->cheats[cheat_index].state ? "ON" : "OFF"
|
||||
@ -395,7 +395,7 @@ static void menu_action_setting_disp_set_label_cheat(
|
||||
|
||||
static void menu_action_setting_disp_set_label_perf_counters_common(
|
||||
const struct retro_perf_counter **counters,
|
||||
unsigned offset, char *type_str, size_t type_str_size
|
||||
unsigned offset, char *s, size_t len
|
||||
)
|
||||
{
|
||||
if (!counters[offset])
|
||||
@ -403,7 +403,7 @@ static void menu_action_setting_disp_set_label_perf_counters_common(
|
||||
if (!counters[offset]->call_cnt)
|
||||
return;
|
||||
|
||||
snprintf(type_str, type_str_size,
|
||||
snprintf(s, len,
|
||||
#ifdef _WIN32
|
||||
"%I64u ticks, %I64u runs.",
|
||||
#else
|
||||
@ -418,7 +418,7 @@ static void menu_action_setting_disp_set_label_perf_counters(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -428,12 +428,12 @@ static void menu_action_setting_disp_set_label_perf_counters(
|
||||
(const struct retro_perf_counter **)perf_counters_rarch;
|
||||
unsigned offset = type - MENU_SETTINGS_PERF_COUNTERS_BEGIN;
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
|
||||
menu_action_setting_disp_set_label_perf_counters_common(
|
||||
counters, offset, type_str, type_str_size);
|
||||
counters, offset, s, len);
|
||||
|
||||
menu->label.is_updated = true;
|
||||
}
|
||||
@ -442,7 +442,7 @@ static void menu_action_setting_disp_set_label_libretro_perf_counters(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -452,12 +452,12 @@ static void menu_action_setting_disp_set_label_libretro_perf_counters(
|
||||
(const struct retro_perf_counter **)perf_counters_libretro;
|
||||
unsigned offset = type - MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN;
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
|
||||
menu_action_setting_disp_set_label_perf_counters_common(
|
||||
counters, offset, type_str, type_str_size);
|
||||
counters, offset, s, len);
|
||||
|
||||
menu->label.is_updated = true;
|
||||
}
|
||||
@ -466,12 +466,12 @@ static void menu_action_setting_disp_set_label_menu_more(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
strlcpy(type_str, "...", type_str_size);
|
||||
strlcpy(s, "...", len);
|
||||
*w = 19;
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
}
|
||||
@ -481,7 +481,7 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -493,7 +493,7 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
|
||||
&global->system.disk_control;
|
||||
|
||||
*w = 19;
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
if (!control)
|
||||
return;
|
||||
@ -502,16 +502,16 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
|
||||
current = control->get_image_index();
|
||||
|
||||
if (current >= images)
|
||||
strlcpy(type_str, "No Disk", type_str_size);
|
||||
strlcpy(s, "No Disk", len);
|
||||
else
|
||||
snprintf(type_str, type_str_size, "%u", current + 1);
|
||||
snprintf(s, len, "%u", current + 1);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_menu_video_resolution(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
@ -519,7 +519,7 @@ static void menu_action_setting_disp_set_label_menu_video_resolution(
|
||||
unsigned width = 0, height = 0;
|
||||
|
||||
*w = 19;
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
|
||||
(void)width;
|
||||
(void)height;
|
||||
@ -527,21 +527,21 @@ static void menu_action_setting_disp_set_label_menu_video_resolution(
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
|
||||
if (video_driver_get_video_output_size(&width, &height))
|
||||
snprintf(type_str, type_str_size, "%ux%u", width, height);
|
||||
snprintf(s, len, "%ux%u", width, height);
|
||||
else
|
||||
strlcpy(type_str, "N/A", type_str_size);
|
||||
strlcpy(s, "N/A", len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_generic_disp_set_label(
|
||||
unsigned *w, char *type_str, size_t type_str_size,
|
||||
unsigned *w, char *s, size_t len,
|
||||
const char *path, const char *label,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
|
||||
if (label)
|
||||
strlcpy(type_str, label, type_str_size);
|
||||
*w = strlen(type_str);
|
||||
strlcpy(s, label, len);
|
||||
*w = strlen(s);
|
||||
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
}
|
||||
@ -550,12 +550,12 @@ static void menu_action_setting_disp_set_label_menu_file_plain(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(FILE)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -563,12 +563,12 @@ static void menu_action_setting_disp_set_label_menu_file_image(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(IMG)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -576,12 +576,12 @@ static void menu_action_setting_disp_set_label_menu_file_use_directory(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, NULL, path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -589,12 +589,12 @@ static void menu_action_setting_disp_set_label_menu_file_directory(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(DIR)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -602,12 +602,12 @@ static void menu_action_setting_disp_set_label_menu_file_carchive(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(COMP)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -615,12 +615,12 @@ static void menu_action_setting_disp_set_label_menu_file_shader(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(SHADER)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -628,12 +628,12 @@ static void menu_action_setting_disp_set_label_menu_file_shader_preset(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(PRESET)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -641,12 +641,12 @@ static void menu_action_setting_disp_set_label_menu_file_in_carchive(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(CFILE)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -654,12 +654,12 @@ static void menu_action_setting_disp_set_label_menu_file_overlay(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(OVERLAY)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -667,12 +667,12 @@ static void menu_action_setting_disp_set_label_menu_file_config(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(CONFIG)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -680,12 +680,12 @@ static void menu_action_setting_disp_set_label_menu_file_font(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(FONT)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -693,12 +693,12 @@ static void menu_action_setting_disp_set_label_menu_file_filter(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(FILTER)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -706,12 +706,12 @@ static void menu_action_setting_disp_set_label_menu_file_url(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(URL)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -719,12 +719,12 @@ static void menu_action_setting_disp_set_label_menu_file_rdb(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(RDB)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -732,12 +732,12 @@ static void menu_action_setting_disp_set_label_menu_file_cursor(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(CURSOR)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
@ -745,26 +745,26 @@ static void menu_action_setting_disp_set_label_menu_file_cheat(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||
menu_action_setting_generic_disp_set_label(w, s, len,
|
||||
path, "(CHEAT)", path_buf, path_buf_size);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label(file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
*type_str = '\0';
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
|
||||
if (!strcmp(label, "performance_counters"))
|
||||
@ -775,13 +775,13 @@ static void menu_action_setting_disp_set_label(file_list_t* list,
|
||||
|
||||
if (type >= MENU_SETTINGS_CORE_OPTION_START)
|
||||
strlcpy(
|
||||
type_str,
|
||||
s,
|
||||
core_option_get_val(global->system.core_options,
|
||||
type - MENU_SETTINGS_CORE_OPTION_START),
|
||||
type_str_size);
|
||||
len);
|
||||
else
|
||||
setting_get_label(list, type_str,
|
||||
type_str_size, w, type, label, entry_label, i);
|
||||
setting_get_label(list, s,
|
||||
len, w, type, label, entry_label, i);
|
||||
|
||||
strlcpy(path_buf, path, path_buf_size);
|
||||
}
|
||||
|
@ -57,8 +57,7 @@ typedef struct menu_file_list_cbs
|
||||
int (*action_down)(unsigned type, const char *label);
|
||||
void (*action_get_representation)(file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *type_str, size_t type_str_size,
|
||||
const char *label, char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *path_buf, size_t path_buf_size);
|
||||
|
@ -313,9 +313,9 @@ int setting_get_description(const char *label, char *s, size_t len);
|
||||
/**
|
||||
* setting_get_label:
|
||||
* @list : File list on which to perform the search
|
||||
* @type_str : String for the type to be represented on-screen as
|
||||
* @s : String for the type to be represented on-screen as
|
||||
* a label.
|
||||
* @type_str_size : Size of @type_str
|
||||
* @len : Size of @s.
|
||||
* @w : Width of the string (for text label representation
|
||||
* purposes in the menu display driver).
|
||||
* @type : Identifier of setting.
|
||||
@ -325,8 +325,8 @@ int setting_get_description(const char *label, char *s, size_t len);
|
||||
*
|
||||
* Get associated label of a setting.
|
||||
**/
|
||||
void setting_get_label(file_list_t *list, char *type_str,
|
||||
size_t type_str_size, unsigned *w, unsigned type,
|
||||
void 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);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user