mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
Fix a bug with undefinegamefunc breaking the key configuration menu.
git-svn-id: https://svn.eduke32.com/eduke32@6350 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c980410ecc
commit
ebe2e67439
1 changed files with 11 additions and 10 deletions
|
@ -1561,22 +1561,23 @@ void Menu_Init(void)
|
|||
}
|
||||
|
||||
// prepare input
|
||||
k = 0;
|
||||
for (i = 0; i < NUMGAMEFUNCTIONS; ++i)
|
||||
{
|
||||
if (MenuGameFuncs[i][0] == '\0')
|
||||
{
|
||||
MEL_KEYBOARDSETUPFUNCS[i] = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
MEL_KEYBOARDSETUPFUNCS[k] = &ME_KEYBOARDSETUPFUNCS[k];
|
||||
ME_KEYBOARDSETUPFUNCS[k] = ME_KEYBOARDSETUPFUNCS_TEMPLATE;
|
||||
ME_KEYBOARDSETUPFUNCS[k].name = MenuGameFuncs[i];
|
||||
ME_KEYBOARDSETUPFUNCS[k].entry = &MEO_KEYBOARDSETUPFUNCS[k];
|
||||
MEO_KEYBOARDSETUPFUNCS[k] = MEO_KEYBOARDSETUPFUNCS_TEMPLATE;
|
||||
MEO_KEYBOARDSETUPFUNCS[k].column[0] = &ud.config.KeyboardKeys[i][0];
|
||||
MEO_KEYBOARDSETUPFUNCS[k].column[1] = &ud.config.KeyboardKeys[i][1];
|
||||
++k;
|
||||
MEL_KEYBOARDSETUPFUNCS[i] = &ME_KEYBOARDSETUPFUNCS[i];
|
||||
ME_KEYBOARDSETUPFUNCS[i] = ME_KEYBOARDSETUPFUNCS_TEMPLATE;
|
||||
ME_KEYBOARDSETUPFUNCS[i].name = MenuGameFuncs[i];
|
||||
ME_KEYBOARDSETUPFUNCS[i].entry = &MEO_KEYBOARDSETUPFUNCS[i];
|
||||
MEO_KEYBOARDSETUPFUNCS[i] = MEO_KEYBOARDSETUPFUNCS_TEMPLATE;
|
||||
MEO_KEYBOARDSETUPFUNCS[i].column[0] = &ud.config.KeyboardKeys[i][0];
|
||||
MEO_KEYBOARDSETUPFUNCS[i].column[1] = &ud.config.KeyboardKeys[i][1];
|
||||
}
|
||||
M_KEYBOARDKEYS.numEntries = k;
|
||||
M_KEYBOARDKEYS.numEntries = NUMGAMEFUNCTIONS;
|
||||
for (i = 0; i < MENUMOUSEFUNCTIONS; ++i)
|
||||
{
|
||||
MEL_MOUSESETUPBTNS[i] = &ME_MOUSESETUPBTNS[i];
|
||||
|
|
Loading…
Reference in a new issue