diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index e83f252cd..fbee86b2e 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -195,7 +195,6 @@ void CONFIG_SetDefaults( void ) { // JBF 20031211 int32 i,f; - byte k1,k2; FXDevice = -1; MusicDevice = -1; @@ -252,52 +251,65 @@ void CONFIG_SetDefaults( void ) Bstrcpy(ud.ridecule[9], "AARRRGHHHHH!!!"); // JBF 20031211 - Bmemset(KeyboardKeys, 0xff, sizeof(KeyboardKeys)); - for (i=0; i < NUMGAMEFUNCTIONS; i++) { - f = CONFIG_FunctionNameToNum( keydefaults[3*i+0] ); - if (f == -1) continue; - k1 = KB_StringToScanCode( keydefaults[3*i+1] ); - k2 = KB_StringToScanCode( keydefaults[3*i+2] ); + memset(KeyboardKeys, 0xff, sizeof(KeyboardKeys)); + for (i=0; i < NUMGAMEFUNCTIONS; i+=3) { + f = CONFIG_FunctionNameToNum( keydefaults[i+0] ); + if (f == -1) continue; + KeyboardKeys[f][0] = KB_StringToScanCode( keydefaults[i+1] ); + KeyboardKeys[f][1] = KB_StringToScanCode( keydefaults[i+2] ); - KeyboardKeys[f][0] = k1; - KeyboardKeys[f][1] = k2; - } + if (f == gamefunc_Show_Console) OSD_CaptureKey(KeyboardKeys[f][0]); + else CONTROL_MapKey( f, KeyboardKeys[f][0], KeyboardKeys[f][1] ); + } - Bmemset(MouseFunctions, -1, sizeof(MouseFunctions)); - for (i=0; i