mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Downgrade some more variables to NAME_MAX_LENGTH
This commit is contained in:
parent
998edca29d
commit
73e5d955c3
@ -412,7 +412,7 @@ static void frontend_gx_exitspawn(char *s, size_t len, char *args)
|
|||||||
if (!string_is_empty(gx_rom_path))
|
if (!string_is_empty(gx_rom_path))
|
||||||
should_load_game = true;
|
should_load_game = true;
|
||||||
#elif defined(HW_RVL)
|
#elif defined(HW_RVL)
|
||||||
char salamander_basename[PATH_MAX_LENGTH];
|
char salamander_basename[NAME_MAX_LENGTH];
|
||||||
|
|
||||||
if (gx_fork_mode == FRONTEND_FORK_NONE)
|
if (gx_fork_mode == FRONTEND_FORK_NONE)
|
||||||
return;
|
return;
|
||||||
@ -426,8 +426,8 @@ static void frontend_gx_exitspawn(char *s, size_t len, char *args)
|
|||||||
/* fall-through */
|
/* fall-through */
|
||||||
case FRONTEND_FORK_RESTART:
|
case FRONTEND_FORK_RESTART:
|
||||||
{
|
{
|
||||||
|
char salamander_name[NAME_MAX_LENGTH];
|
||||||
char new_path[PATH_MAX_LENGTH];
|
char new_path[PATH_MAX_LENGTH];
|
||||||
char salamander_name[PATH_MAX_LENGTH];
|
|
||||||
|
|
||||||
if (frontend_driver_get_salamander_basename(salamander_name,
|
if (frontend_driver_get_salamander_basename(salamander_name,
|
||||||
sizeof(salamander_name)))
|
sizeof(salamander_name)))
|
||||||
|
@ -60,8 +60,8 @@ static void find_first_libretro_core(char *first_file,
|
|||||||
|
|
||||||
for (i = 0; i < list->size && !ret; i++)
|
for (i = 0; i < list->size && !ret; i++)
|
||||||
{
|
{
|
||||||
char fname[PATH_MAX_LENGTH] = {0};
|
char salamander_name[NAME_MAX_LENGTH] = {0};
|
||||||
char salamander_name[PATH_MAX_LENGTH] = {0};
|
char fname[NAME_MAX_LENGTH] = {0};
|
||||||
const char *libretro_elem = (const char*)list->elems[i].data;
|
const char *libretro_elem = (const char*)list->elems[i].data;
|
||||||
|
|
||||||
RARCH_LOG("Checking library: \"%s\".\n", libretro_elem);
|
RARCH_LOG("Checking library: \"%s\".\n", libretro_elem);
|
||||||
|
@ -42,11 +42,11 @@ typedef struct
|
|||||||
enum manual_content_scan_system_name_type system_name_type;
|
enum manual_content_scan_system_name_type system_name_type;
|
||||||
enum manual_content_scan_core_type core_type;
|
enum manual_content_scan_core_type core_type;
|
||||||
|
|
||||||
|
char core_name[NAME_MAX_LENGTH];
|
||||||
|
char system_name_database[NAME_MAX_LENGTH];
|
||||||
|
char system_name_custom[NAME_MAX_LENGTH];
|
||||||
char content_dir[DIR_MAX_LENGTH];
|
char content_dir[DIR_MAX_LENGTH];
|
||||||
char system_name_content_dir[DIR_MAX_LENGTH];
|
char system_name_content_dir[DIR_MAX_LENGTH];
|
||||||
char system_name_database[PATH_MAX_LENGTH];
|
|
||||||
char system_name_custom[PATH_MAX_LENGTH];
|
|
||||||
char core_name[NAME_MAX_LENGTH];
|
|
||||||
char core_path[PATH_MAX_LENGTH];
|
char core_path[PATH_MAX_LENGTH];
|
||||||
char file_exts_core[PATH_MAX_LENGTH];
|
char file_exts_core[PATH_MAX_LENGTH];
|
||||||
char file_exts_custom[PATH_MAX_LENGTH];
|
char file_exts_custom[PATH_MAX_LENGTH];
|
||||||
@ -1356,7 +1356,7 @@ void manual_content_scan_add_content_to_playlist(
|
|||||||
if (!playlist_entry_exists(playlist, playlist_content_path))
|
if (!playlist_entry_exists(playlist, playlist_content_path))
|
||||||
{
|
{
|
||||||
struct playlist_entry entry = {0};
|
struct playlist_entry entry = {0};
|
||||||
char label[PATH_MAX_LENGTH];
|
char label[NAME_MAX_LENGTH];
|
||||||
|
|
||||||
label[0] = '\0';
|
label[0] = '\0';
|
||||||
|
|
||||||
|
@ -82,11 +82,11 @@ enum manual_content_scan_playlist_refresh_status
|
|||||||
* for a manual content scan task */
|
* for a manual content scan task */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char playlist_file[PATH_MAX_LENGTH];
|
char core_name[NAME_MAX_LENGTH];
|
||||||
|
char system_name[NAME_MAX_LENGTH];
|
||||||
|
char database_name[NAME_MAX_LENGTH];
|
||||||
char content_dir[DIR_MAX_LENGTH];
|
char content_dir[DIR_MAX_LENGTH];
|
||||||
char system_name[PATH_MAX_LENGTH];
|
char playlist_file[PATH_MAX_LENGTH];
|
||||||
char database_name[PATH_MAX_LENGTH];
|
|
||||||
char core_name[PATH_MAX_LENGTH];
|
|
||||||
char core_path[PATH_MAX_LENGTH];
|
char core_path[PATH_MAX_LENGTH];
|
||||||
char file_exts[PATH_MAX_LENGTH];
|
char file_exts[PATH_MAX_LENGTH];
|
||||||
char dat_file_path[PATH_MAX_LENGTH];
|
char dat_file_path[PATH_MAX_LENGTH];
|
||||||
|
@ -1257,7 +1257,7 @@ static void menu_action_setting_disp_set_label_menu_file_directory(
|
|||||||
char *s2, size_t len2)
|
char *s2, size_t len2)
|
||||||
{
|
{
|
||||||
#if IOS
|
#if IOS
|
||||||
char tmp[PATH_MAX_LENGTH] = {0};
|
char tmp[PATH_MAX_LENGTH];
|
||||||
fill_pathname_abbreviate_special(tmp, path, sizeof(tmp));
|
fill_pathname_abbreviate_special(tmp, path, sizeof(tmp));
|
||||||
MENU_ACTION_SETTING_GENERIC_DISP_SET_LABEL_2(w, s, len,
|
MENU_ACTION_SETTING_GENERIC_DISP_SET_LABEL_2(w, s, len,
|
||||||
tmp, "(DIR)", STRLEN_CONST("(DIR)"), s2, len2);
|
tmp, "(DIR)", STRLEN_CONST("(DIR)"), s2, len2);
|
||||||
|
@ -78,7 +78,7 @@ static int action_bind_label_playlist_collection_entry(
|
|||||||
/* Handle collection playlists */
|
/* Handle collection playlists */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char playlist_name[PATH_MAX_LENGTH];
|
char playlist_name[NAME_MAX_LENGTH];
|
||||||
strlcpy(playlist_name, playlist_file, sizeof(playlist_name));
|
strlcpy(playlist_name, playlist_file, sizeof(playlist_name));
|
||||||
path_remove_extension(playlist_name);
|
path_remove_extension(playlist_name);
|
||||||
|
|
||||||
|
@ -1512,7 +1512,7 @@ int generic_action_ok_displaylist_push(
|
|||||||
break;
|
break;
|
||||||
case ACTION_OK_DL_DATABASE_MANAGER_LIST:
|
case ACTION_OK_DL_DATABASE_MANAGER_LIST:
|
||||||
{
|
{
|
||||||
char lpl_basename[PATH_MAX_LENGTH];
|
char lpl_basename[NAME_MAX_LENGTH];
|
||||||
struct menu_state *menu_st = menu_state_get_ptr();
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
filebrowser_clear_type();
|
filebrowser_clear_type();
|
||||||
fill_pathname_join_special(tmp,
|
fill_pathname_join_special(tmp,
|
||||||
@ -2633,7 +2633,7 @@ static int action_ok_playlist_entry_collection(const char *path,
|
|||||||
{
|
{
|
||||||
playlist_config_t playlist_config;
|
playlist_config_t playlist_config;
|
||||||
char content_path[PATH_MAX_LENGTH];
|
char content_path[PATH_MAX_LENGTH];
|
||||||
char content_label[PATH_MAX_LENGTH];
|
char content_label[NAME_MAX_LENGTH];
|
||||||
char core_path[PATH_MAX_LENGTH];
|
char core_path[PATH_MAX_LENGTH];
|
||||||
size_t selection_ptr = entry_idx;
|
size_t selection_ptr = entry_idx;
|
||||||
bool playlist_initialized = false;
|
bool playlist_initialized = false;
|
||||||
@ -5693,9 +5693,9 @@ static int action_ok_add_to_favorites(const char *path,
|
|||||||
if (!string_is_empty(content_path))
|
if (!string_is_empty(content_path))
|
||||||
{
|
{
|
||||||
union string_list_elem_attr attr;
|
union string_list_elem_attr attr;
|
||||||
|
char core_name[NAME_MAX_LENGTH];
|
||||||
|
char content_label[NAME_MAX_LENGTH];
|
||||||
char core_path[PATH_MAX_LENGTH];
|
char core_path[PATH_MAX_LENGTH];
|
||||||
char core_name[PATH_MAX_LENGTH];
|
|
||||||
char content_label[PATH_MAX_LENGTH];
|
|
||||||
runloop_state_t *runloop_st = runloop_state_get_ptr();
|
runloop_state_t *runloop_st = runloop_state_get_ptr();
|
||||||
struct retro_system_info *sysinfo = &runloop_st->system.info;
|
struct retro_system_info *sysinfo = &runloop_st->system.info;
|
||||||
struct string_list *str_list = NULL;
|
struct string_list *str_list = NULL;
|
||||||
@ -5832,11 +5832,10 @@ static int action_ok_add_entry_to_playlist(const char *path,
|
|||||||
if (!string_is_empty(entry->path))
|
if (!string_is_empty(entry->path))
|
||||||
{
|
{
|
||||||
union string_list_elem_attr attr;
|
union string_list_elem_attr attr;
|
||||||
char core_display_name[PATH_MAX_LENGTH];
|
char core_display_name[NAME_MAX_LENGTH];
|
||||||
|
char core_name[NAME_MAX_LENGTH];
|
||||||
char core_path[PATH_MAX_LENGTH];
|
char core_path[PATH_MAX_LENGTH];
|
||||||
char core_name[PATH_MAX_LENGTH];
|
struct string_list *str_list = NULL;
|
||||||
struct string_list
|
|
||||||
*str_list = NULL;
|
|
||||||
|
|
||||||
core_display_name[0] = '\0';
|
core_display_name[0] = '\0';
|
||||||
core_path[0] = '\0';
|
core_path[0] = '\0';
|
||||||
@ -5999,11 +5998,10 @@ static int action_ok_add_to_favorites_playlist(const char *path,
|
|||||||
if (!string_is_empty(entry->path))
|
if (!string_is_empty(entry->path))
|
||||||
{
|
{
|
||||||
union string_list_elem_attr attr;
|
union string_list_elem_attr attr;
|
||||||
char core_display_name[PATH_MAX_LENGTH];
|
char core_display_name[NAME_MAX_LENGTH];
|
||||||
|
char core_name[NAME_MAX_LENGTH];
|
||||||
char core_path[PATH_MAX_LENGTH];
|
char core_path[PATH_MAX_LENGTH];
|
||||||
char core_name[PATH_MAX_LENGTH];
|
struct string_list *str_list = NULL;
|
||||||
struct string_list
|
|
||||||
*str_list = NULL;
|
|
||||||
|
|
||||||
core_display_name[0] = '\0';
|
core_display_name[0] = '\0';
|
||||||
core_path[0] = '\0';
|
core_path[0] = '\0';
|
||||||
|
@ -413,7 +413,7 @@ static int action_get_title_deferred_playlist_list(const char *path, const char
|
|||||||
/* Handle collection playlists */
|
/* Handle collection playlists */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char playlist_name[PATH_MAX_LENGTH];
|
char playlist_name[NAME_MAX_LENGTH];
|
||||||
strlcpy(playlist_name, playlist_file, sizeof(playlist_name));
|
strlcpy(playlist_name, playlist_file, sizeof(playlist_name));
|
||||||
path_remove_extension(playlist_name);
|
path_remove_extension(playlist_name);
|
||||||
|
|
||||||
|
@ -680,11 +680,12 @@ typedef struct materialui_handle
|
|||||||
enum materialui_landscape_layout_optimization_type
|
enum materialui_landscape_layout_optimization_type
|
||||||
last_landscape_layout_optimization;
|
last_landscape_layout_optimization;
|
||||||
enum materialui_list_view_type list_view_type;
|
enum materialui_list_view_type list_view_type;
|
||||||
char sysicons_path[PATH_MAX_LENGTH];
|
|
||||||
char icons_path[PATH_MAX_LENGTH];
|
|
||||||
char msgbox[1024];
|
char msgbox[1024];
|
||||||
char menu_title[NAME_MAX_LENGTH];
|
char menu_title[NAME_MAX_LENGTH];
|
||||||
char fullscreen_thumbnail_label[NAME_MAX_LENGTH];
|
char fullscreen_thumbnail_label[NAME_MAX_LENGTH];
|
||||||
|
char sysicons_path[PATH_MAX_LENGTH];
|
||||||
|
char icons_path[PATH_MAX_LENGTH];
|
||||||
} materialui_handle_t;
|
} materialui_handle_t;
|
||||||
|
|
||||||
static void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)
|
static void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)
|
||||||
|
@ -617,14 +617,18 @@ struct ozone_handle
|
|||||||
uint8_t sidebar_index_list[SCROLL_INDEX_SIZE];
|
uint8_t sidebar_index_list[SCROLL_INDEX_SIZE];
|
||||||
uint8_t sidebar_index_size;
|
uint8_t sidebar_index_size;
|
||||||
|
|
||||||
char title[PATH_MAX_LENGTH];
|
char title[NAME_MAX_LENGTH];
|
||||||
|
char selection_core_name[NAME_MAX_LENGTH];
|
||||||
|
char selection_playtime[NAME_MAX_LENGTH];
|
||||||
|
char selection_lastplayed[NAME_MAX_LENGTH];
|
||||||
|
char selection_entry_enumeration[NAME_MAX_LENGTH];
|
||||||
|
char fullscreen_thumbnail_label[NAME_MAX_LENGTH];
|
||||||
|
|
||||||
char assets_path[PATH_MAX_LENGTH];
|
char assets_path[PATH_MAX_LENGTH];
|
||||||
char png_path[PATH_MAX_LENGTH];
|
char png_path[PATH_MAX_LENGTH];
|
||||||
char icons_path[PATH_MAX_LENGTH];
|
char icons_path[PATH_MAX_LENGTH];
|
||||||
char icons_path_default[PATH_MAX_LENGTH];
|
char icons_path_default[PATH_MAX_LENGTH];
|
||||||
char tab_path[PATH_MAX_LENGTH];
|
char tab_path[PATH_MAX_LENGTH];
|
||||||
char fullscreen_thumbnail_label[NAME_MAX_LENGTH];
|
|
||||||
|
|
||||||
/* These have to be huge, because runloop_st->name.savestate
|
/* These have to be huge, because runloop_st->name.savestate
|
||||||
* has a hard-coded size of 8192...
|
* has a hard-coded size of 8192...
|
||||||
@ -633,11 +637,6 @@ struct ozone_handle
|
|||||||
char savestate_thumbnail_file_path[8204]; /* TODO/FIXME - check size */
|
char savestate_thumbnail_file_path[8204]; /* TODO/FIXME - check size */
|
||||||
char prev_savestate_thumbnail_file_path[8204]; /* TODO/FIXME - check size */
|
char prev_savestate_thumbnail_file_path[8204]; /* TODO/FIXME - check size */
|
||||||
|
|
||||||
char selection_core_name[NAME_MAX_LENGTH];
|
|
||||||
char selection_playtime[NAME_MAX_LENGTH];
|
|
||||||
char selection_lastplayed[NAME_MAX_LENGTH];
|
|
||||||
char selection_entry_enumeration[NAME_MAX_LENGTH];
|
|
||||||
|
|
||||||
char thumbnails_left_status_prev;
|
char thumbnails_left_status_prev;
|
||||||
char thumbnails_right_status_prev;
|
char thumbnails_right_status_prev;
|
||||||
|
|
||||||
|
@ -2552,7 +2552,7 @@ static int create_string_list_rdb_entry_int(
|
|||||||
size_t _len;
|
size_t _len;
|
||||||
char str[16];
|
char str[16];
|
||||||
char tmp[128];
|
char tmp[128];
|
||||||
char out_lbl[PATH_MAX_LENGTH];
|
char out_lbl[NAME_MAX_LENGTH];
|
||||||
str[0] = '\0';
|
str[0] = '\0';
|
||||||
out_lbl[0] = '\0';
|
out_lbl[0] = '\0';
|
||||||
|
|
||||||
@ -4516,7 +4516,7 @@ static unsigned menu_displaylist_parse_cores(
|
|||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
if (frontend_driver_has_fork())
|
if (frontend_driver_has_fork())
|
||||||
{
|
{
|
||||||
char salamander_name[PATH_MAX_LENGTH];
|
char salamander_name[NAME_MAX_LENGTH];
|
||||||
|
|
||||||
salamander_name[0] = '\0';
|
salamander_name[0] = '\0';
|
||||||
|
|
||||||
@ -4587,10 +4587,10 @@ static unsigned menu_displaylist_parse_cores(
|
|||||||
static unsigned menu_displaylist_parse_add_to_playlist_list(
|
static unsigned menu_displaylist_parse_add_to_playlist_list(
|
||||||
file_list_t *list, settings_t *settings)
|
file_list_t *list, settings_t *settings)
|
||||||
{
|
{
|
||||||
|
char playlist_display_name[NAME_MAX_LENGTH];
|
||||||
unsigned count = 0;
|
unsigned count = 0;
|
||||||
const char *dir_playlist = settings->paths.directory_playlist;
|
const char *dir_playlist = settings->paths.directory_playlist;
|
||||||
bool show_hidden_files = settings->bools.show_hidden_files;
|
bool show_hidden_files = settings->bools.show_hidden_files;
|
||||||
char playlist_display_name[PATH_MAX_LENGTH];
|
|
||||||
struct string_list *str_list = dir_list_new_special(
|
struct string_list *str_list = dir_list_new_special(
|
||||||
dir_playlist, DIR_LIST_COLLECTIONS, NULL, show_hidden_files);
|
dir_playlist, DIR_LIST_COLLECTIONS, NULL, show_hidden_files);
|
||||||
|
|
||||||
@ -5048,7 +5048,7 @@ static unsigned menu_displaylist_parse_content_information(
|
|||||||
if (!string_is_empty(db_name))
|
if (!string_is_empty(db_name))
|
||||||
{
|
{
|
||||||
char *db_name_no_ext = NULL;
|
char *db_name_no_ext = NULL;
|
||||||
char db_name_no_ext_buff[PATH_MAX_LENGTH];
|
char db_name_no_ext_buff[NAME_MAX_LENGTH];
|
||||||
/* Remove .lpl extension
|
/* Remove .lpl extension
|
||||||
* > path_remove_extension() requires a char * (not const)
|
* > path_remove_extension() requires a char * (not const)
|
||||||
* so have to use a temporary buffer... */
|
* so have to use a temporary buffer... */
|
||||||
@ -12312,7 +12312,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
if (!string_is_empty(cd_info.title))
|
if (!string_is_empty(cd_info.title))
|
||||||
{
|
{
|
||||||
/* TODO/FIXME - localize */
|
/* TODO/FIXME - localize */
|
||||||
char title[sizeof("Title: ") + sizeof(cd_info.title)]; /* TODO/FIXME - C89 compliance */
|
char title[NAME_MAX_LENGTH];
|
||||||
size_t _len = strlcpy(title, "Title: ", sizeof(title));
|
size_t _len = strlcpy(title, "Title: ", sizeof(title));
|
||||||
strlcpy(title + _len, cd_info.title, sizeof(title) - _len);
|
strlcpy(title + _len, cd_info.title, sizeof(title) - _len);
|
||||||
|
|
||||||
@ -12687,7 +12687,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
for (i = 0; i < profiles_count; i++)
|
for (i = 0; i < profiles_count; i++)
|
||||||
{
|
{
|
||||||
char title[PATH_MAX_LENGTH];
|
char title[NAME_MAX_LENGTH];
|
||||||
char* profile = SWITCH_CPU_PROFILES[i];
|
char* profile = SWITCH_CPU_PROFILES[i];
|
||||||
char* speed = SWITCH_CPU_SPEEDS[i];
|
char* speed = SWITCH_CPU_SPEEDS[i];
|
||||||
size_t _len = strlcpy(title, profile, sizeof(title));
|
size_t _len = strlcpy(title, profile, sizeof(title));
|
||||||
@ -13133,7 +13133,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
case DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR:
|
case DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR:
|
||||||
{
|
{
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
char new_label[PATH_MAX_LENGTH];
|
char new_label[NAME_MAX_LENGTH];
|
||||||
char *save = NULL;
|
char *save = NULL;
|
||||||
char *info_path_cpy = strdup(info->path);
|
char *info_path_cpy = strdup(info->path);
|
||||||
const char *con = strtok_r(info_path_cpy, ";", &save);
|
const char *con = strtok_r(info_path_cpy, ";", &save);
|
||||||
@ -13169,7 +13169,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
menu_entries_clear(info->list);
|
menu_entries_clear(info->list);
|
||||||
{
|
{
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
char new_label[PATH_MAX_LENGTH];
|
char new_label[NAME_MAX_LENGTH];
|
||||||
const char *
|
const char *
|
||||||
network_buildbot_assets_url = settings->paths.network_buildbot_assets_url;
|
network_buildbot_assets_url = settings->paths.network_buildbot_assets_url;
|
||||||
|
|
||||||
@ -14988,7 +14988,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
case DISPLAYLIST_USER_BINDS_LIST:
|
case DISPLAYLIST_USER_BINDS_LIST:
|
||||||
menu_entries_clear(info->list);
|
menu_entries_clear(info->list);
|
||||||
{
|
{
|
||||||
char lbl[PATH_MAX_LENGTH];
|
char lbl[NAME_MAX_LENGTH];
|
||||||
unsigned val = atoi(info->path);
|
unsigned val = atoi(info->path);
|
||||||
const char *temp_val = msg_hash_to_str(
|
const char *temp_val = msg_hash_to_str(
|
||||||
(enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_USER_1_BINDS + (val-1)));
|
(enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_USER_1_BINDS + (val-1)));
|
||||||
|
@ -434,8 +434,8 @@ typedef struct
|
|||||||
|
|
||||||
char pass_dir[DIR_MAX_LENGTH];
|
char pass_dir[DIR_MAX_LENGTH];
|
||||||
char preset_dir[DIR_MAX_LENGTH];
|
char preset_dir[DIR_MAX_LENGTH];
|
||||||
char preset_file_name[PATH_MAX_LENGTH];
|
char preset_file_name[NAME_MAX_LENGTH];
|
||||||
char pass_file_name[PATH_MAX_LENGTH];
|
char pass_file_name[NAME_MAX_LENGTH];
|
||||||
} last_shader_selection;
|
} last_shader_selection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -444,7 +444,7 @@ typedef struct
|
|||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
char directory[DIR_MAX_LENGTH];
|
char directory[DIR_MAX_LENGTH];
|
||||||
char file_name[PATH_MAX_LENGTH];
|
char file_name[NAME_MAX_LENGTH];
|
||||||
} last_start_content;
|
} last_start_content;
|
||||||
|
|
||||||
char menu_state_msg[8192];
|
char menu_state_msg[8192];
|
||||||
@ -456,7 +456,7 @@ typedef struct
|
|||||||
char scratch_buf[PATH_MAX_LENGTH];
|
char scratch_buf[PATH_MAX_LENGTH];
|
||||||
char scratch2_buf[PATH_MAX_LENGTH];
|
char scratch2_buf[PATH_MAX_LENGTH];
|
||||||
char db_playlist_file[PATH_MAX_LENGTH];
|
char db_playlist_file[PATH_MAX_LENGTH];
|
||||||
char filebrowser_label[PATH_MAX_LENGTH];
|
char filebrowser_label[NAME_MAX_LENGTH];
|
||||||
char detect_content_path[PATH_MAX_LENGTH];
|
char detect_content_path[PATH_MAX_LENGTH];
|
||||||
} menu_handle_t;
|
} menu_handle_t;
|
||||||
|
|
||||||
|
14
playlist.c
14
playlist.c
@ -2760,7 +2760,7 @@ static bool playlist_read_file(playlist_t *playlist)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
char default_core_path[PATH_MAX_LENGTH];
|
char default_core_path[PATH_MAX_LENGTH];
|
||||||
char default_core_name[PATH_MAX_LENGTH];
|
char default_core_name[NAME_MAX_LENGTH];
|
||||||
|
|
||||||
default_core_path[0] = '\0';
|
default_core_path[0] = '\0';
|
||||||
default_core_name[0] = '\0';
|
default_core_name[0] = '\0';
|
||||||
@ -3089,19 +3089,19 @@ static int playlist_qsort_func(const struct playlist_entry *a,
|
|||||||
* have no other option...) */
|
* have no other option...) */
|
||||||
if (string_is_empty(a_str))
|
if (string_is_empty(a_str))
|
||||||
{
|
{
|
||||||
if (!(a_fallback_label = (char*)calloc(PATH_MAX_LENGTH, sizeof(char))))
|
if (!(a_fallback_label = (char*)calloc(NAME_MAX_LENGTH, sizeof(char))))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
if (!string_is_empty(a->path))
|
if (!string_is_empty(a->path))
|
||||||
fill_pathname(a_fallback_label,
|
fill_pathname(a_fallback_label,
|
||||||
path_basename_nocompression(a->path),
|
path_basename_nocompression(a->path),
|
||||||
"",
|
"",
|
||||||
PATH_MAX_LENGTH * sizeof(char));
|
NAME_MAX_LENGTH * sizeof(char));
|
||||||
/* If filename is also empty, use core name
|
/* If filename is also empty, use core name
|
||||||
* instead -> this matches the behaviour of
|
* instead -> this matches the behaviour of
|
||||||
* menu_displaylist_parse_playlist() */
|
* menu_displaylist_parse_playlist() */
|
||||||
else if (!string_is_empty(a->core_name))
|
else if (!string_is_empty(a->core_name))
|
||||||
strlcpy(a_fallback_label, a->core_name, PATH_MAX_LENGTH * sizeof(char));
|
strlcpy(a_fallback_label, a->core_name, NAME_MAX_LENGTH * sizeof(char));
|
||||||
|
|
||||||
/* If both filename and core name are empty,
|
/* If both filename and core name are empty,
|
||||||
* then have to compare an empty string
|
* then have to compare an empty string
|
||||||
@ -3113,16 +3113,16 @@ static int playlist_qsort_func(const struct playlist_entry *a,
|
|||||||
|
|
||||||
if (string_is_empty(b_str))
|
if (string_is_empty(b_str))
|
||||||
{
|
{
|
||||||
if (!(b_fallback_label = (char*)calloc(PATH_MAX_LENGTH, sizeof(char))))
|
if (!(b_fallback_label = (char*)calloc(NAME_MAX_LENGTH, sizeof(char))))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
if (!string_is_empty(b->path))
|
if (!string_is_empty(b->path))
|
||||||
fill_pathname(b_fallback_label,
|
fill_pathname(b_fallback_label,
|
||||||
path_basename_nocompression(b->path),
|
path_basename_nocompression(b->path),
|
||||||
"",
|
"",
|
||||||
PATH_MAX_LENGTH * sizeof(char));
|
NAME_MAX_LENGTH * sizeof(char));
|
||||||
else if (!string_is_empty(b->core_name))
|
else if (!string_is_empty(b->core_name))
|
||||||
strlcpy(b_fallback_label, b->core_name, PATH_MAX_LENGTH * sizeof(char));
|
strlcpy(b_fallback_label, b->core_name, NAME_MAX_LENGTH * sizeof(char));
|
||||||
|
|
||||||
b_str = b_fallback_label;
|
b_str = b_fallback_label;
|
||||||
}
|
}
|
||||||
|
@ -4148,7 +4148,7 @@ static bool runloop_path_init_subsystem(runloop_state_t *runloop_st)
|
|||||||
{
|
{
|
||||||
char ext[32];
|
char ext[32];
|
||||||
union string_list_elem_attr attr;
|
union string_list_elem_attr attr;
|
||||||
char savename[PATH_MAX_LENGTH];
|
char savename[NAME_MAX_LENGTH];
|
||||||
char path[PATH_MAX_LENGTH];
|
char path[PATH_MAX_LENGTH];
|
||||||
size_t _len = 0;
|
size_t _len = 0;
|
||||||
const struct retro_subsystem_memory_info *mem =
|
const struct retro_subsystem_memory_info *mem =
|
||||||
|
@ -230,8 +230,8 @@ runtime_log_t *runtime_log_init(
|
|||||||
bool log_per_core)
|
bool log_per_core)
|
||||||
{
|
{
|
||||||
char log_file_dir[DIR_MAX_LENGTH];
|
char log_file_dir[DIR_MAX_LENGTH];
|
||||||
char content_name[PATH_MAX_LENGTH];
|
char content_name[NAME_MAX_LENGTH];
|
||||||
char core_name[PATH_MAX_LENGTH];
|
char core_name[nAME_MAX_LENGTH];
|
||||||
char log_file_path[PATH_MAX_LENGTH];
|
char log_file_path[PATH_MAX_LENGTH];
|
||||||
char tmp_buf[PATH_MAX_LENGTH];
|
char tmp_buf[PATH_MAX_LENGTH];
|
||||||
bool supports_no_game = false;
|
bool supports_no_game = false;
|
||||||
|
@ -1040,7 +1040,7 @@ static int task_database_iterate_playlist_lutro(
|
|||||||
if (!playlist_entry_exists(playlist, path))
|
if (!playlist_entry_exists(playlist, path))
|
||||||
{
|
{
|
||||||
struct playlist_entry entry;
|
struct playlist_entry entry;
|
||||||
char game_title[PATH_MAX_LENGTH];
|
char game_title[NAME_MAX_LENGTH];
|
||||||
fill_pathname(game_title,
|
fill_pathname(game_title,
|
||||||
path_basename(path), "", sizeof(game_title));
|
path_basename(path), "", sizeof(game_title));
|
||||||
path_remove_extension(game_title);
|
path_remove_extension(game_title);
|
||||||
|
@ -388,7 +388,7 @@ static void pl_manager_validate_core_association(
|
|||||||
goto reset_core;
|
goto reset_core;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char core_display_name[PATH_MAX_LENGTH];
|
char core_display_name[NAME_MAX_LENGTH];
|
||||||
core_info_t *core_info = NULL;
|
core_info_t *core_info = NULL;
|
||||||
|
|
||||||
/* Search core info */
|
/* Search core info */
|
||||||
@ -706,7 +706,7 @@ bool task_push_pl_manager_clean_playlist(
|
|||||||
size_t _len;
|
size_t _len;
|
||||||
task_finder_data_t find_data;
|
task_finder_data_t find_data;
|
||||||
char task_title[128];
|
char task_title[128];
|
||||||
char playlist_name[PATH_MAX_LENGTH];
|
char playlist_name[NAME_MAX_LENGTH];
|
||||||
retro_task_t *task = task_init();
|
retro_task_t *task = task_init();
|
||||||
pl_manager_handle_t *pl_manager = (pl_manager_handle_t*)
|
pl_manager_handle_t *pl_manager = (pl_manager_handle_t*)
|
||||||
calloc(1, sizeof(pl_manager_handle_t));
|
calloc(1, sizeof(pl_manager_handle_t));
|
||||||
|
Loading…
Reference in New Issue
Block a user