mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-19 11:23:16 +08:00
parse -lang switch at startup, remove MSG_Init search for -lang switch
This commit is contained in:
@@ -136,13 +136,13 @@ bool MSG_Write(const char * location) {
|
||||
}
|
||||
|
||||
void MSG_Init() {
|
||||
Section_prop * section=static_cast<Section_prop *>(control->GetSection("dosbox"));
|
||||
Section_prop *section=static_cast<Section_prop *>(control->GetSection("dosbox"));
|
||||
|
||||
std::string file_name;
|
||||
if (control->cmdline->FindString("-lang",file_name,true)) {
|
||||
LoadMessageFile(file_name.c_str());
|
||||
} else {
|
||||
if (control->opt_lang != "") {
|
||||
LoadMessageFile(control->opt_lang.c_str());
|
||||
}
|
||||
else {
|
||||
Prop_path* pathprop = section->Get_path("language");
|
||||
if(pathprop) LoadMessageFile(pathprop->realpath.c_str());
|
||||
if (pathprop != NULL) LoadMessageFile(pathprop->realpath.c_str());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user