mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-18 17:32:24 +08:00
more
This commit is contained in:
@@ -200,8 +200,8 @@ void LoadMessageFile(const char * fname) {
|
||||
if(*fname=='\0') return;//empty string=no languagefile
|
||||
|
||||
LOG(LOG_MISC,LOG_DEBUG)("Loading message file %s",fname);
|
||||
std::string config_path, exepath=GetDOSBoxXPath();
|
||||
Cross::GetPlatformConfigDir(config_path);
|
||||
std::string config_path, res_path, exepath=GetDOSBoxXPath();
|
||||
Cross::GetPlatformConfigDir(config_path), Cross::GetPlatformResDir(res_path);
|
||||
|
||||
FILE * mfile=fopen(fname,"rt");
|
||||
if (!mfile) mfile=fopen((fname + std::string(".lng")).c_str(),"rt");
|
||||
@@ -209,18 +209,24 @@ void LoadMessageFile(const char * fname) {
|
||||
if (!mfile && exepath.size()) mfile=fopen((exepath + fname + ".lng").c_str(),"rt");
|
||||
if (!mfile && config_path.size()) mfile=fopen((config_path + fname).c_str(),"rt");
|
||||
if (!mfile && config_path.size()) mfile=fopen((config_path + fname + ".lng").c_str(),"rt");
|
||||
if (!mfile && res_path.size()) mfile=fopen((res_path + fname).c_str(),"rt");
|
||||
if (!mfile && res_path.size()) mfile=fopen((res_path + fname + ".lng").c_str(),"rt");
|
||||
if (!mfile) mfile=fopen((std::string("languages/") + fname).c_str(),"rt");
|
||||
if (!mfile) mfile=fopen((std::string("languages/") + fname + ".lng").c_str(),"rt");
|
||||
if (!mfile && exepath.size()) mfile=fopen((exepath + "languages/" + fname).c_str(),"rt");
|
||||
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 && res_path.size()) mfile=fopen((res_path + "languages/" + fname).c_str(),"rt");
|
||||
if (!mfile && res_path.size()) mfile=fopen((res_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 (!mfile && res_path.size()) mfile=fopen((res_path + "language/" + fname).c_str(),"rt");
|
||||
if (!mfile && res_path.size()) mfile=fopen((res_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");
|
||||
|
Reference in New Issue
Block a user