more fixups

This commit is contained in:
Wengier
2022-06-27 13:12:10 -04:00
parent 1966a9e425
commit b46e3cc376
14 changed files with 126 additions and 41 deletions

View File

@@ -215,6 +215,12 @@ void LoadMessageFile(const char * fname) {
if (!mfile && exepath.size()) mfile=fopen((exepath + "languages/" + fname + ".lng").c_str(),"rt");
if (!mfile && config_path.size()) mfile=fopen((config_path + "languages/" + fname).c_str(),"rt");
if (!mfile && config_path.size()) mfile=fopen((config_path + "languages/" + fname + ".lng").c_str(),"rt");
if (!mfile) mfile=fopen((std::string("language/") + fname).c_str(),"rt");
if (!mfile) mfile=fopen((std::string("language/") + fname + ".lng").c_str(),"rt");
if (!mfile && exepath.size()) mfile=fopen((exepath + "language/" + fname).c_str(),"rt");
if (!mfile && exepath.size()) mfile=fopen((exepath + "language/" + fname + ".lng").c_str(),"rt");
if (!mfile && config_path.size()) mfile=fopen((config_path + "language/" + fname).c_str(),"rt");
if (!mfile && config_path.size()) mfile=fopen((config_path + "language/" + fname + ".lng").c_str(),"rt");
#if defined(WIN32) && defined(C_SDL2)
std::string localname = fname;
if (!mfile && FileDirExistUTF8(localname, fname) == 1) mfile=fopen(localname.c_str(),"rt");