From 809bbfcccfe49fb7ef9d509b3f4a7243fa82c473 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Tue, 21 May 2024 15:40:05 +0200 Subject: [PATCH] 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 --- neo/framework/KeyInput.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/neo/framework/KeyInput.cpp b/neo/framework/KeyInput.cpp index 71c033bf..ea034198 100644 --- a/neo/framework/KeyInput.cpp +++ b/neo/framework/KeyInput.cpp @@ -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' ) { + // "" idStr::Copynz( keyName, common->GetLanguageDict()->GetString( "#str_07133" ), sizeof( keyName ) ); } idStr::ToLower( keyName );