From 5aadb6c114eea441523435b3355795c880a0048a Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 29 Jun 2008 21:01:07 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@816 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/config.c | 16 +++++++++++++--- polymer/eduke32/source/game.c | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 13aee88a3..f5ca4a1b4 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -327,7 +327,7 @@ void CONFIG_SetDefaults(void) void CONFIG_ReadKeys(void) { - int32 i; + int32 i, j; int32 numkeyentries; int32 function; char keyname1[80]; @@ -370,7 +370,12 @@ void CONFIG_ReadKeys(void) if (key1 != 0xff && keyname1[0]) { 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]) { Bsprintf(tempbuf,"gamefunc_%s",CONFIG_FunctionNumToName(function)); @@ -385,7 +390,12 @@ void CONFIG_ReadKeys(void) if (key2 != 0xff && keyname2[0]) { 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]) { Bsprintf(tempbuf,"gamefunc_%s",CONFIG_FunctionNumToName(function)); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 449df0d9e..5e9359b3e 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -191,9 +191,9 @@ keydef keynames[]= { "J", 0x24 }, { "K", 0x25 }, { "L", 0x26 }, - { ";", 0x27 }, + { "SemiColon", 0x27 }, { "'", 0x28 }, - { "`", 0x29 }, + { "Tilde", 0x29 }, { "LShift", 0x2a }, { "\\", 0x2b }, { "Z", 0x2c },