mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-12 10:37:02 +00:00
Use unordered_map for keydown to allow codes above 255 (#248)
- Adds internal support for 32bit key codes, required for proper keyboard input on Linux - Use gdk_keyval_name to get key name on Linux
This commit is contained in:
parent
5e968eff4f
commit
9f02733a0d
14 changed files with 143 additions and 83 deletions
|
|
@ -280,7 +280,9 @@ bool EmulatedController::is_mapping_down(uint64 mapping) const
|
|||
if (it != m_mappings.cend())
|
||||
{
|
||||
if (const auto controller = it->second.controller.lock()) {
|
||||
return controller->get_state().buttons.test(it->second.button);
|
||||
auto& buttons=controller->get_state().buttons;
|
||||
auto buttonState=buttons.find(it->second.button);
|
||||
return buttonState!=buttons.end() && buttonState->second;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue