mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-12-01 16:52:29 +00:00
Workaround for missing " or " string in Doom3 demo for Windows
The original binding menu uses #str_07183 between keys - this should be " or ", but in the windows demo that entry is missing in strings/english.lang
This commit is contained in:
parent
9e4fe84eb8
commit
809bbfcccf
1 changed files with 8 additions and 1 deletions
|
@ -667,18 +667,25 @@ const char *idKeyInput::KeysFromBinding( const char *bind ) {
|
|||
int i;
|
||||
static char keyName[MAX_STRING_CHARS];
|
||||
|
||||
const char* orstr = common->GetLanguageDict()->GetString( "#str_07183" );
|
||||
if ( orstr == NULL || orstr[0] == '\0' || orstr[0] == '#' ) {
|
||||
// fallback for windows demo where this string is missing
|
||||
orstr = " or ";
|
||||
}
|
||||
|
||||
keyName[0] = '\0';
|
||||
if ( bind && *bind ) {
|
||||
for ( i = 0; i < MAX_KEYS; i++ ) {
|
||||
if ( keys[i].binding.Icmp( bind ) == 0 ) {
|
||||
if ( keyName[0] != '\0' ) {
|
||||
idStr::Append( keyName, sizeof( keyName ), common->GetLanguageDict()->GetString( "#str_07183" ) );
|
||||
idStr::Append( keyName, sizeof( keyName ), orstr );
|
||||
}
|
||||
idStr::Append( keyName, sizeof( keyName ), KeyNumToString( i, true ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( keyName[0] == '\0' ) {
|
||||
// "<empty>"
|
||||
idStr::Copynz( keyName, common->GetLanguageDict()->GetString( "#str_07133" ), sizeof( keyName ) );
|
||||
}
|
||||
idStr::ToLower( keyName );
|
||||
|
|
Loading…
Reference in a new issue