1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

FileSystemUtils.cpp: make translatable

setLevelDirError was changed from snprintf-style to VFormat, but it's
only used in that file so...

This commit is part of rewritten history of the localization branch.
The original (unsquashed) commit history can be found here:
https://github.com/Dav999-v/VVVVVV/tree/localization-orig
This commit is contained in:
Dav999-v 2022-12-30 23:28:58 +01:00 committed by Misa Elizabeth Kai
parent c142b3bb3b
commit 1e45e263f5

View file

@ -454,20 +454,16 @@ const char* FILESYSTEM_getLevelDirError(void)
return levelDirError;
}
static int setLevelDirError(const char* text, ...)
static void setLevelDirError(const char* text, const char* args_index, ...)
{
va_list list;
int retval;
levelDirHasError = true;
va_start(list, text);
retval = SDL_vsnprintf(levelDirError, sizeof(levelDirError), text, list);
va_list list;
va_start(list, args_index);
vformat_buf_valist(levelDirError, sizeof(levelDirError), text, args_index, list);
va_end(list);
vlog_error("%s", levelDirError);
return retval;
}
static bool FILESYSTEM_mountAssetsFrom(const char *fname)
@ -478,7 +474,8 @@ static bool FILESYSTEM_mountAssetsFrom(const char *fname)
if (real_dir == NULL)
{
setLevelDirError(
"Could not mount %s: real directory doesn't exist",
loc::gettext("Could not mount {path}: real directory doesn't exist"),
"path:str",
fname
);
return false;