Create fill_pathname_join_concat

This commit is contained in:
twinaphex 2016-06-29 17:46:50 +02:00
parent eafce41a16
commit c38c28a0f5
3 changed files with 19 additions and 5 deletions

View File

@ -587,6 +587,15 @@ void fill_pathname_join(char *out_path,
retro_assert(strlcat(out_path, path, size) < size);
}
void fill_pathname_join_concat(char *out_path,
const char *dir, const char *path,
const char *concat,
size_t size)
{
fill_pathname_join(out_path, dir, path, size);
strlcat(out_path, concat, size);
}
void fill_pathname_join_noext(char *out_path,
const char *dir, const char *path, size_t size)
{

View File

@ -310,6 +310,11 @@ void fill_pathname_resolve_relative(char *out_path, const char *in_refpath,
void fill_pathname_join(char *out_path, const char *dir,
const char *path, size_t size);
void fill_pathname_join_concat(char *out_path,
const char *dir, const char *path,
const char *concat,
size_t size);
void fill_pathname_join_noext(char *out_path,
const char *dir, const char *path, size_t size);

View File

@ -1359,13 +1359,13 @@ static void xmb_context_reset_horizontal_list(
fill_pathname_application_special(iconpath, sizeof(iconpath),
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
fill_pathname_join(texturepath, iconpath, sysname,
fill_pathname_join_concat(texturepath, iconpath, sysname,
".png",
sizeof(texturepath));
strlcat(texturepath, ".png", sizeof(texturepath));
fill_pathname_join(content_texturepath, iconpath,
sysname, sizeof(content_texturepath));
strlcat(content_texturepath, "-content.png",
fill_pathname_join_concat(content_texturepath, iconpath,
sysname,
"-content.png",
sizeof(content_texturepath));
image_texture_load(&ti, texturepath);