mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 15:50:47 -07:00
hid: Rewrite shared memory management (#2257)
* hid: Rewrite shared memory management This entirely rewrite our ancient (and original) HID shared memory interface to be more usable and accurate. HID update logics were updated to reflect those changes but should work still the same way it previously did. This need heavy testing just in case to avoid possible regressions. * Silence warnings * Address gdkchan's comments * Address Ac_K's comments * Address one missing nit
This commit is contained in:
@ -456,14 +456,14 @@ namespace Ryujinx.Input.HLE
|
||||
KeyboardInput hidKeyboard = new KeyboardInput
|
||||
{
|
||||
Modifier = 0,
|
||||
Keys = new int[0x8]
|
||||
Keys = new ulong[0x4]
|
||||
};
|
||||
|
||||
foreach (HLEKeyboardMappingEntry entry in KeyMapping)
|
||||
{
|
||||
int value = keyboardState.IsPressed(entry.TargetKey) ? 1 : 0;
|
||||
ulong value = keyboardState.IsPressed(entry.TargetKey) ? 1UL : 0UL;
|
||||
|
||||
hidKeyboard.Keys[entry.Target / 0x20] |= (value << (entry.Target % 0x20));
|
||||
hidKeyboard.Keys[entry.Target / 0x40] |= (value << (entry.Target % 0x40));
|
||||
}
|
||||
|
||||
foreach (HLEKeyboardMappingEntry entry in KeyModifierMapping)
|
||||
|
Reference in New Issue
Block a user