mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Avoid overwriting key to scancode mapping
This commit is contained in:
parent
914ae374ff
commit
7cf6d72633
@ -565,7 +565,8 @@ void InputImpl::ensureMappings()
|
||||
Keyboard::Scancode scan = static_cast<Keyboard::Scancode>(i);
|
||||
UINT virtualKey = sfScanToVirtualKey(scan);
|
||||
Keyboard::Key key = virtualKeyToSfKey(virtualKey);
|
||||
m_keyToScancodeMapping[key] = scan;
|
||||
if (key != Keyboard::Unknown && m_keyToScancodeMapping[key] == Keyboard::Scan::Unknown)
|
||||
m_keyToScancodeMapping[key] = scan;
|
||||
m_scancodeToKeyMapping[scan] = key;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user