mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-21 01:37:04 +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
|
|
@ -120,7 +120,8 @@ ControllerState XInputController::raw_state()
|
|||
}
|
||||
|
||||
// Buttons
|
||||
result.buttons = state.Gamepad.wButtons;
|
||||
for(int i=0;i<std::numeric_limits<WORD>::digits;i++)
|
||||
result.buttons[i] = state.Gamepad.wButtons & (1<<i);
|
||||
|
||||
if (state.Gamepad.sThumbLX > 0)
|
||||
result.axis.x = (float)state.Gamepad.sThumbLX / std::numeric_limits<sint16>::max();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue