mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
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:
parent
0713c44219
commit
80d9badb9b
1 changed files with 4 additions and 1 deletions
|
@ -1228,7 +1228,7 @@ static void UninitDirectInput(void)
|
||||||
static void GetKeyNames(void)
|
static void GetKeyNames(void)
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
char tbuf[MAX_PATH];
|
char tbuf[MAX_PATH], *cp;
|
||||||
|
|
||||||
memset(key_names,0,sizeof(key_names));
|
memset(key_names,0,sizeof(key_names));
|
||||||
|
|
||||||
|
@ -1237,6 +1237,9 @@ static void GetKeyNames(void)
|
||||||
tbuf[0] = 0;
|
tbuf[0] = 0;
|
||||||
GetKeyNameText((i>128?(i+128):i)<<16, tbuf, sizeof(key_names[i])-1);
|
GetKeyNameText((i>128?(i+128):i)<<16, tbuf, sizeof(key_names[i])-1);
|
||||||
Bstrncpy(&key_names[i][0], 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 = '?';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue