mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Get rid of the code reading in [KeyDefinitions] section of eduke32.cfg.
That section was only ever read in for little profit and never written out! Keyboard input is actually dispatched as OSD commands for a good while, so that old cruft has to go! git-svn-id: https://svn.eduke32.com/eduke32@3125 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c429f3fbc4
commit
27c0c9c342
3 changed files with 0 additions and 65 deletions
|
@ -338,67 +338,7 @@ void CONFIG_SetDefaults(void)
|
|||
CONTROL_MapAnalogAxis(i, ud.config.JoystickAnalogueAxes[i], controldevice_joystick);
|
||||
}
|
||||
}
|
||||
/*
|
||||
===================
|
||||
=
|
||||
= CONFIG_ReadKeys
|
||||
=
|
||||
===================
|
||||
*/
|
||||
|
||||
void CONFIG_ReadKeys(void)
|
||||
{
|
||||
int32_t i;
|
||||
int32_t numkeyentries;
|
||||
int32_t function;
|
||||
char keyname1[80];
|
||||
char keyname2[80];
|
||||
kb_scancode key1,key2;
|
||||
|
||||
if (ud.config.scripthandle < 0) return;
|
||||
|
||||
numkeyentries = SCRIPT_NumberEntries(ud.config.scripthandle,"KeyDefinitions");
|
||||
|
||||
Bmemset(&KeyBindings,0,sizeof(KeyBindings));
|
||||
|
||||
for (i=0; i<numkeyentries; i++)
|
||||
{
|
||||
function = CONFIG_FunctionNameToNum(SCRIPT_Entry(ud.config.scripthandle,"KeyDefinitions", i));
|
||||
if (function != -1)
|
||||
{
|
||||
memset(keyname1,0,sizeof(keyname1));
|
||||
memset(keyname2,0,sizeof(keyname2));
|
||||
SCRIPT_GetDoubleString
|
||||
(
|
||||
ud.config.scripthandle,
|
||||
"KeyDefinitions",
|
||||
SCRIPT_Entry(ud.config.scripthandle, "KeyDefinitions", i),
|
||||
keyname1,
|
||||
keyname2
|
||||
);
|
||||
key1 = 0xff;
|
||||
key2 = 0xff;
|
||||
if (keyname1[0])
|
||||
{
|
||||
key1 = (uint8_t) KB_StringToScanCode(keyname1);
|
||||
}
|
||||
if (keyname2[0])
|
||||
{
|
||||
key2 = (uint8_t) KB_StringToScanCode(keyname2);
|
||||
}
|
||||
ud.config.KeyboardKeys[function][0] = key1;
|
||||
ud.config.KeyboardKeys[function][1] = key2;
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<NUMGAMEFUNCTIONS; i++)
|
||||
{
|
||||
if (i == gamefunc_Show_Console)
|
||||
OSD_CaptureKey(ud.config.KeyboardKeys[i][0]);
|
||||
else
|
||||
CONFIG_MapKey(i, ud.config.KeyboardKeys[i][0], 0, ud.config.KeyboardKeys[i][1], 0);
|
||||
}
|
||||
}
|
||||
|
||||
// wrapper for CONTROL_MapKey(), generates key bindings to reflect changes to keyboard setup
|
||||
void CONFIG_MapKey(int32_t which, kb_scancode key1, kb_scancode oldkey1, kb_scancode key2, kb_scancode oldkey2)
|
||||
|
@ -767,8 +707,6 @@ int32_t CONFIG_ReadSetup(void)
|
|||
|
||||
}
|
||||
|
||||
// CONFIG_ReadKeys();
|
||||
|
||||
//CONFIG_SetupMouse(ud.config.scripthandle);
|
||||
//CONFIG_SetupJoystick(ud.config.scripthandle);
|
||||
ud.config.setupread = 1;
|
||||
|
|
|
@ -42,6 +42,5 @@ char *CONFIG_FunctionNumToName(int32_t func);
|
|||
int32_t CONFIG_AnalogNameToNum(const char *func);
|
||||
const char *CONFIG_AnalogNumToName(int32_t func);
|
||||
void CONFIG_SetDefaults(void);
|
||||
void CONFIG_ReadKeys(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -9586,8 +9586,6 @@ static void G_Startup(void)
|
|||
|
||||
G_CompileScripts();
|
||||
|
||||
CONFIG_ReadKeys(); // we re-read the keys after compiling the CONs
|
||||
|
||||
if (initengine())
|
||||
{
|
||||
wm_msgbox("Build Engine Initialization Error",
|
||||
|
|
Loading…
Reference in a new issue