Since internal keycodes are now scancodes, they do not need to be resolved

scancodes-fix
Günther Brammer 2013-03-24 22:30:39 +01:00
parent 71d9e3c9e3
commit 50eb1b6a76
2 changed files with 2 additions and 7 deletions

View File

@ -303,12 +303,6 @@ bool C4PlayerControlAssignment::ResolveRefs(C4PlayerControlAssignmentSet *pParen
is_key_reference = true;
szKeyName +=4;
}
else if (*szKeyName == '$')
{
// this is a scan code. re-resolve in case keyboard layout changed.
// is this still relevant?
rKeyComboItem.Key = C4KeyCodeEx::GetKeyByScanCode(szKeyName);
}
}
if (is_key_reference)
{

View File

@ -198,7 +198,6 @@ struct C4KeyCodeEx
// helpers
static C4KeyShiftState String2KeyShift(const StdStrBuf &sName);
static C4KeyCode GetKeyByScanCode(const char *scan_code);
static C4KeyCode String2KeyCode(const StdStrBuf &sName);
static StdStrBuf KeyCode2String(C4KeyCode wCode, bool fHumanReadable, bool fShort);
StdStrBuf ToString(bool fHumanReadable, bool fShort) const;
@ -221,6 +220,8 @@ struct C4KeyCodeEx
: Key(Key), dwShift(Shift), fRepeated(fIsRepeated) {}
bool IsRepeated() const { return fRepeated; }
private:
static C4KeyCode GetKeyByScanCode(const char *scan_code);
};
// extra data associated with a key event