mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Avoid overwriting key to scancode mapping
This commit is contained in:
parent
914ae374ff
commit
7cf6d72633
@ -565,6 +565,7 @@ void InputImpl::ensureMappings()
|
||||
Keyboard::Scancode scan = static_cast<Keyboard::Scancode>(i);
|
||||
UINT virtualKey = sfScanToVirtualKey(scan);
|
||||
Keyboard::Key key = virtualKeyToSfKey(virtualKey);
|
||||
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