git-svn-id: https://svn.eduke32.com/eduke32@816 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-06-29 21:01:07 +00:00
parent 6c078cfab6
commit 5aadb6c114
2 changed files with 15 additions and 5 deletions

View file

@ -327,7 +327,7 @@ void CONFIG_SetDefaults(void)
void CONFIG_ReadKeys(void) void CONFIG_ReadKeys(void)
{ {
int32 i; int32 i, j;
int32 numkeyentries; int32 numkeyentries;
int32 function; int32 function;
char keyname1[80]; char keyname1[80];
@ -370,7 +370,12 @@ void CONFIG_ReadKeys(void)
if (key1 != 0xff && keyname1[0]) if (key1 != 0xff && keyname1[0])
{ {
boundkeys[key1].repeat = 1; boundkeys[key1].repeat = 1;
boundkeys[key1].key=Bstrdup(keyname1); for (j=0;keynames[j].name;j++)
if (key1 == keynames[j].id)
break;
if (keynames[j].name)
boundkeys[key1].key=Bstrdup(keynames[j].name);
else boundkeys[key1].key=Bstrdup(keyname1);
if (!boundkeys[key1].name[0]) if (!boundkeys[key1].name[0])
{ {
Bsprintf(tempbuf,"gamefunc_%s",CONFIG_FunctionNumToName(function)); Bsprintf(tempbuf,"gamefunc_%s",CONFIG_FunctionNumToName(function));
@ -385,7 +390,12 @@ void CONFIG_ReadKeys(void)
if (key2 != 0xff && keyname2[0]) if (key2 != 0xff && keyname2[0])
{ {
boundkeys[key2].repeat = 1; boundkeys[key2].repeat = 1;
boundkeys[key2].key=Bstrdup(keyname2); for (j=0;keynames[j].name;j++)
if (key2 == keynames[j].id)
break;
if (keynames[j].name)
boundkeys[key2].key=Bstrdup(keynames[j].name);
else boundkeys[key2].key=Bstrdup(keyname2);
if (!boundkeys[key2].name[0]) if (!boundkeys[key2].name[0])
{ {
Bsprintf(tempbuf,"gamefunc_%s",CONFIG_FunctionNumToName(function)); Bsprintf(tempbuf,"gamefunc_%s",CONFIG_FunctionNumToName(function));

View file

@ -191,9 +191,9 @@ keydef keynames[]=
{ "J", 0x24 }, { "J", 0x24 },
{ "K", 0x25 }, { "K", 0x25 },
{ "L", 0x26 }, { "L", 0x26 },
{ ";", 0x27 }, { "SemiColon", 0x27 },
{ "'", 0x28 }, { "'", 0x28 },
{ "`", 0x29 }, { "Tilde", 0x29 },
{ "LShift", 0x2a }, { "LShift", 0x2a },
{ "\\", 0x2b }, { "\\", 0x2b },
{ "Z", 0x2c }, { "Z", 0x2c },