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:
parent
c142b3bb3b
commit
1e45e263f5
1 changed files with 6 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue