mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Create fill_pathname_join_noext
This commit is contained in:
parent
51b2e920fe
commit
ca3eecf5c0
5 changed files with 16 additions and 13 deletions
|
@ -574,6 +574,13 @@ void fill_pathname_join(char *out_path,
|
||||||
retro_assert(strlcat(out_path, path, size) < size);
|
retro_assert(strlcat(out_path, path, size) < size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fill_pathname_join_noext(char *out_path,
|
||||||
|
const char *dir, const char *path, size_t size)
|
||||||
|
{
|
||||||
|
fill_pathname_join(out_path, dir, path, size);
|
||||||
|
path_remove_extension(out_path);
|
||||||
|
}
|
||||||
|
|
||||||
void fill_string_join(char *out_path,
|
void fill_string_join(char *out_path,
|
||||||
const char *append, size_t size)
|
const char *append, size_t size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -304,6 +304,9 @@ void fill_pathname_resolve_relative(char *out_path, const char *in_refpath,
|
||||||
void fill_pathname_join(char *out_path, const char *dir,
|
void fill_pathname_join(char *out_path, const char *dir,
|
||||||
const char *path, size_t size);
|
const char *path, size_t size);
|
||||||
|
|
||||||
|
void fill_pathname_join_noext(char *out_path,
|
||||||
|
const char *dir, const char *path, size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fill_string_join:
|
* fill_string_join:
|
||||||
* @out_path : output path
|
* @out_path : output path
|
||||||
|
|
|
@ -1033,12 +1033,11 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
|
||||||
|
|
||||||
if (tmp)
|
if (tmp)
|
||||||
{
|
{
|
||||||
fill_pathname_join(
|
fill_pathname_join_noext(
|
||||||
path,
|
path,
|
||||||
settings->directory.dynamic_wallpapers,
|
settings->directory.dynamic_wallpapers,
|
||||||
tmp,
|
tmp,
|
||||||
sizeof(path));
|
sizeof(path));
|
||||||
path_remove_extension(path);
|
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,13 +114,11 @@ static void print_buf_lines(file_list_t *list, char *buf,
|
||||||
char core_path[PATH_MAX_LENGTH] = {0};
|
char core_path[PATH_MAX_LENGTH] = {0};
|
||||||
char *last = NULL;
|
char *last = NULL;
|
||||||
|
|
||||||
fill_pathname_join(
|
fill_pathname_join_noext(
|
||||||
core_path,
|
core_path,
|
||||||
settings->path.libretro_info,
|
settings->path.libretro_info,
|
||||||
line_start,
|
line_start,
|
||||||
sizeof(core_path));
|
sizeof(core_path));
|
||||||
|
|
||||||
path_remove_extension(core_path);
|
|
||||||
path_remove_extension(core_path);
|
path_remove_extension(core_path);
|
||||||
last = (char*)strrchr(core_path, '_');
|
last = (char*)strrchr(core_path, '_');
|
||||||
if (*last)
|
if (*last)
|
||||||
|
@ -225,14 +223,13 @@ static void print_buf_lines_extended(file_list_t *list, char *buf, int buf_size,
|
||||||
char display_name[PATH_MAX_LENGTH] = {0};
|
char display_name[PATH_MAX_LENGTH] = {0};
|
||||||
char *last = NULL;
|
char *last = NULL;
|
||||||
|
|
||||||
fill_pathname_join(
|
fill_pathname_join_noext(
|
||||||
core_path,
|
core_path,
|
||||||
settings->path.libretro_info,
|
settings->path.libretro_info,
|
||||||
core_pathname,
|
core_pathname,
|
||||||
sizeof(core_path));
|
sizeof(core_path));
|
||||||
|
path_remove_extension(core_path);
|
||||||
|
|
||||||
path_remove_extension(core_path);
|
|
||||||
path_remove_extension(core_path);
|
|
||||||
last = (char*)strrchr(core_path, '_');
|
last = (char*)strrchr(core_path, '_');
|
||||||
if (!string_is_empty(last))
|
if (!string_is_empty(last))
|
||||||
{
|
{
|
||||||
|
@ -2754,9 +2751,8 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
||||||
{
|
{
|
||||||
char db_path[PATH_MAX_LENGTH] = {0};
|
char db_path[PATH_MAX_LENGTH] = {0};
|
||||||
|
|
||||||
fill_pathname_join(db_path, settings->path.content_database,
|
fill_pathname_join_noext(db_path, settings->path.content_database,
|
||||||
db_name, sizeof(db_path));
|
db_name, sizeof(db_path));
|
||||||
path_remove_extension(db_path);
|
|
||||||
strlcat(db_path, file_path_str(FILE_PATH_RDB_EXTENSION),
|
strlcat(db_path, file_path_str(FILE_PATH_RDB_EXTENSION),
|
||||||
sizeof(db_path));
|
sizeof(db_path));
|
||||||
|
|
||||||
|
|
|
@ -272,11 +272,9 @@ static int database_info_list_iterate_found_match(
|
||||||
database_info_t *db_info_entry = &db_state->info->list[
|
database_info_t *db_info_entry = &db_state->info->list[
|
||||||
db_state->entry_index];
|
db_state->entry_index];
|
||||||
|
|
||||||
fill_short_pathname_representation(db_playlist_base_str,
|
fill_short_pathname_representation_noext(db_playlist_base_str,
|
||||||
db_path, sizeof(db_playlist_base_str));
|
db_path, sizeof(db_playlist_base_str));
|
||||||
|
|
||||||
path_remove_extension(db_playlist_base_str);
|
|
||||||
|
|
||||||
strlcat(db_playlist_base_str,
|
strlcat(db_playlist_base_str,
|
||||||
file_path_str(FILE_PATH_LPL_EXTENSION),
|
file_path_str(FILE_PATH_LPL_EXTENSION),
|
||||||
sizeof(db_playlist_base_str));
|
sizeof(db_playlist_base_str));
|
||||||
|
|
Loading…
Add table
Reference in a new issue