Fix double presses of A(RETURN)/B(BACKSPACE) in Desktop mode

This commit is contained in:
Kamil Trzciński 2022-11-27 19:38:24 +01:00
parent c243d0dd69
commit c72128fc5c
2 changed files with 3 additions and 9 deletions

View file

@ -17,6 +17,7 @@
- STEAM+B will kill foreground if hold longer than 3s
- Allow to configure `StartupProfile` in `SteamController.dll.config`
- Increase joystick speed and key repeats in Desktop Mode
- Fix double presses of A(RETURN)/B(BACKSPACE) in Desktop mode
## 0.4.x

View file

@ -41,14 +41,8 @@ namespace SteamController.Profiles
EmulateMouseOnRStick(c);
EmulateDPadArrows(c);
if (c.Steam.BtnA.Pressed())
{
c.Keyboard.KeyPress(VirtualKeyCode.RETURN);
}
if (c.Steam.BtnB.Pressed())
{
c.Keyboard.KeyPress(VirtualKeyCode.BACK);
}
c.Keyboard[VirtualKeyCode.RETURN] = c.Steam.BtnA;
c.Keyboard[VirtualKeyCode.BACK] = c.Steam.BtnB;
return Status.Continue;
}
@ -67,7 +61,6 @@ namespace SteamController.Profiles
private void EmulateDPadArrows(Context c)
{
c.Keyboard[VirtualKeyCode.RETURN] = c.Steam.BtnA;
c.Keyboard[VirtualKeyCode.LEFT] = c.Steam.BtnDpadLeft;
c.Keyboard[VirtualKeyCode.RIGHT] = c.Steam.BtnDpadRight;
c.Keyboard[VirtualKeyCode.UP] = c.Steam.BtnDpadUp;