mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Dehardcode some strings
This commit is contained in:
parent
acc0f2143f
commit
17cf1ae58f
@ -78,7 +78,7 @@ uintptr_t cheevos_get_badge_texture(const char *badge, bool locked)
|
||||
strlcpy(badge_file, badge, sizeof(badge_file));
|
||||
if (locked)
|
||||
strlcat(badge_file, "_lock", sizeof(badge_file));
|
||||
strlcat(badge_file, ".png", sizeof(badge_file));
|
||||
strlcat(badge_file, FILE_PATH_PNG_EXTENSION, sizeof(badge_file));
|
||||
|
||||
fill_pathname_application_special(fullpath, sizeof(fullpath),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
@ -1861,11 +1861,13 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
if (coro->j == 0)
|
||||
snprintf(coro->badge_name,
|
||||
sizeof(coro->badge_name),
|
||||
"%s.png", coro->cheevo->info->badge);
|
||||
"%s" FILE_PATH_PNG_EXTENSION,
|
||||
coro->cheevo->info->badge);
|
||||
else
|
||||
snprintf(coro->badge_name,
|
||||
sizeof(coro->badge_name),
|
||||
"%s_lock.png", coro->cheevo->info->badge);
|
||||
"%s_lock" FILE_PATH_PNG_EXTENSION,
|
||||
coro->cheevo->info->badge);
|
||||
|
||||
fill_pathname_join(
|
||||
coro->badge_fullpath,
|
||||
@ -1882,7 +1884,7 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
#endif
|
||||
snprintf(coro->url,
|
||||
sizeof(coro->url),
|
||||
"http://i.retroachievements.org/Badge/%s",
|
||||
FILE_PATH_RETROACHIEVEMENTS_URL "/Badge/%s",
|
||||
coro->badge_name);
|
||||
|
||||
CORO_GOSUB(RCHEEVOS_HTTP_GET);
|
||||
@ -1891,7 +1893,7 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
{
|
||||
if (!filestream_write_file(coro->badge_fullpath,
|
||||
coro->json, coro->k))
|
||||
CHEEVOS_ERR(RCHEEVOS_TAG "error writing badge %s\n", coro->badge_fullpath);
|
||||
CHEEVOS_ERR(RCHEEVOS_TAG "Error writing badge %s\n", coro->badge_fullpath);
|
||||
else
|
||||
{
|
||||
CHEEVOS_FREE(coro->json);
|
||||
|
@ -71,6 +71,7 @@ RETRO_BEGIN_DECLS
|
||||
#define FILE_PATH_INDEX_DIRS_URL ".index-dirs"
|
||||
#define FILE_PATH_INDEX_EXTENDED_URL ".index-extended"
|
||||
#define FILE_PATH_NETPLAY_ROOM_LIST_URL "registry.lpl"
|
||||
#define FILE_PATH_RETROACHIEVEMENTS_URL "http://i.retroachievements.org"
|
||||
#define FILE_PATH_LOBBY_LIBRETRO_URL "http://lobby.libretro.com/"
|
||||
#define FILE_PATH_CORE_THUMBNAILS_URL "http://thumbnails.libretro.com"
|
||||
#define FILE_PATH_CORE_THUMBNAILPACKS_URL "http://thumbnailpacks.libretro.com"
|
||||
|
Loading…
x
Reference in New Issue
Block a user