Create fill_pathname_join_delim_concat

This commit is contained in:
twinaphex 2016-06-29 17:51:25 +02:00
parent c38c28a0f5
commit a7e8707f7d
3 changed files with 17 additions and 4 deletions

View File

@ -2362,8 +2362,7 @@ static void save_keybind_joykey(config_file_t *conf, const char *prefix,
{
char key[64] = {0};
fill_pathname_join_delim(key, prefix, base, '_', sizeof(key));
strlcat(key, "_btn", sizeof(key));
fill_pathname_join_delim_concat(key, prefix, base, '_', "_btn", sizeof(key));
if (bind->joykey == NO_BTN)
{
@ -2383,8 +2382,10 @@ static void save_keybind_axis(config_file_t *conf, const char *prefix,
unsigned axis = 0;
char dir = '\0';
fill_pathname_join_delim(key, prefix, base, '_', sizeof(key));
strlcat(key, "_axis", sizeof(key));
fill_pathname_join_delim_concat(key,
prefix, base, '_',
"_axis",
sizeof(key));
if (bind->joyaxis == AXIS_NONE)
{

View File

@ -643,6 +643,14 @@ void fill_pathname_join_delim(char *out_path, const char *dir,
retro_assert(strlcat(out_path, path, size) < size);
}
void fill_pathname_join_delim_concat(char *out_path, const char *dir,
const char *path, const char delim, const char *concat,
size_t size)
{
fill_pathname_join_delim(out_path, dir, path, delim, size);
strlcat(out_path, concat, size);
}
/**
* fill_short_pathname_representation:
* @out_rep : output representation

View File

@ -349,6 +349,10 @@ void fill_string_concat(char *out_path,
void fill_pathname_join_delim(char *out_path, const char *dir,
const char *path, const char delim, size_t size);
void fill_pathname_join_delim_concat(char *out_path, const char *dir,
const char *path, const char delim, const char *concat,
size_t size);
/**
* fill_short_pathname_representation:
* @out_rep : output representation