- save all bound keys, not only the one with commands that have both slots assigned.

This commit is contained in:
Christoph Oelckers 2019-10-26 21:16:23 +02:00
parent db1a9a9363
commit 70a7d1bd82
2 changed files with 27 additions and 27 deletions

View file

@ -443,6 +443,7 @@ void FGameConfigFile::ArchiveGameData (const char *gamename)
if (symb == NULL || symb->name == nullptr ||symb->help == nullptr) if (symb == NULL || symb->name == nullptr ||symb->help == nullptr)
break; break;
if (symb->func == (void*)OSD_ALIAS)
SetValueForKey(symb->name, symb->help); SetValueForKey(symb->name, symb->help);
} }
} }

View file

@ -305,6 +305,7 @@ void CONFIG_SetDefaultKeys(const char *defbinds, bool lazy/*=false*/)
{ {
sc.MustGetToken(TK_StringConst); sc.MustGetToken(TK_StringConst);
default1 = KB_StringToScanCode(sc.String); default1 = KB_StringToScanCode(sc.String);
}
if (num >= 0 && num < NUMGAMEFUNCTIONS) if (num >= 0 && num < NUMGAMEFUNCTIONS)
{ {
auto& key = KeyboardKeys[num]; auto& key = KeyboardKeys[num];
@ -328,10 +329,8 @@ void CONFIG_SetDefaultKeys(const char *defbinds, bool lazy/*=false*/)
else else
CONFIG_MapKey(num, key[0], 0, key[1], 0); CONFIG_MapKey(num, key[0], 0, key[1], 0);
}
CONTROL_DefineFlag(num, false); CONTROL_DefineFlag(num, false);
}
}
} }
} }