Patch up this issue:

http://forums.duke4.net/topic/4685-glitch-on-keyboard-customization-page/
by setting the key_names[] characters in the non-ASCII range to '?' on Windows

git-svn-id: https://svn.eduke32.com/eduke32@1953 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-07-30 20:36:04 +00:00
parent 0713c44219
commit 80d9badb9b
1 changed files with 4 additions and 1 deletions

View File

@ -1228,7 +1228,7 @@ static void UninitDirectInput(void)
static void GetKeyNames(void)
{
int32_t i;
char tbuf[MAX_PATH];
char tbuf[MAX_PATH], *cp;
memset(key_names,0,sizeof(key_names));
@ -1237,6 +1237,9 @@ static void GetKeyNames(void)
tbuf[0] = 0;
GetKeyNameText((i>128?(i+128):i)<<16, tbuf, sizeof(key_names[i])-1);
Bstrncpy(&key_names[i][0], tbuf, sizeof(key_names[i])-1);
for (cp=key_names[i]; *cp; cp++)
if (!(*cp>=32 && *cp<127))
*cp = '?';
}
}