mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-04 22:57:19 +02:00
Fix strafing doesn't work (#216)
This commit is contained in:
parent
58f8f6e762
commit
89a5bbdd2e
@ -4321,7 +4321,7 @@ class MkbHandler {
|
||||
value = (buttonIndex === GamepadKey.RS_LEFT || buttonIndex === GamepadKey.RS_UP) ? -1 : 1;
|
||||
}
|
||||
|
||||
virtualGamepad.axes[axisIndex] = pressed ? value : 0;
|
||||
virtualGamepad.axes[axisIndex] += pressed ? value : - value;
|
||||
} else {
|
||||
virtualGamepad.buttons[buttonIndex].pressed = pressed;
|
||||
virtualGamepad.buttons[buttonIndex].value = pressed ? 1 : 0;
|
||||
@ -4345,6 +4345,11 @@ class MkbHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore repeating keys
|
||||
if (e.repeat) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
this.#pressButton(buttonIndex, isKeyDown);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user