Internal messages are overwritten by the language file now.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@440
This commit is contained in:
parent
70d5be8ddb
commit
7149f0611b
1 changed files with 10 additions and 1 deletions
|
@ -40,7 +40,15 @@ struct MessageBlock {
|
|||
|
||||
static list<MessageBlock> Lang;
|
||||
typedef list<MessageBlock>::iterator itmb;
|
||||
|
||||
void MSG_Add(const char * _name, const char* _val) {
|
||||
/* Find the message */
|
||||
for(itmb tel=Lang.begin();tel!=Lang.end();tel++) {
|
||||
if((*tel).name==_name) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* Even if the message doesn't exist add it */
|
||||
Lang.push_back(MessageBlock(_name,_val));
|
||||
}
|
||||
|
||||
|
@ -55,8 +63,9 @@ void MSG_Replace(const char * _name, const char* _val) {
|
|||
}
|
||||
}
|
||||
/* Even if the message doesn't exist add it */
|
||||
MSG_Add(_name,_val);
|
||||
Lang.push_back(MessageBlock(_name,_val));
|
||||
}
|
||||
|
||||
static void LoadMessageFile(const char * fname) {
|
||||
if (!fname) return;
|
||||
if(*fname=='\0') return;//empty string=no languagefile
|
||||
|
|
Loading…
Add table
Reference in a new issue