Fixed pressing more than one arrow key at one moment

This commit is contained in:
Your Name 2024-11-25 19:06:51 +01:00
parent 668868b839
commit 0bc2a80eef

View File

@ -314,10 +314,10 @@ namespace WindowsPhoneSpeedyBlupi
keyboardPressed = true; keyboardPressed = true;
} }
KeyboardPress keyboardPress = keyboardPressed ? Misc.intToKeyboardPress(touchOrClick.Y) : KeyboardPress.None; KeyboardPress keyboardPress = keyboardPressed ? Misc.intToKeyboardPress(touchOrClick.Y) : KeyboardPress.None;
keyPressedUp = keyboardPress == KeyboardPress.Up; keyPressedUp = keyboardPress == KeyboardPress.Up ? true : keyPressedUp;
keyPressedDown = keyboardPress == KeyboardPress.Down; keyPressedDown = keyboardPress == KeyboardPress.Down ? true : keyPressedDown;
keyPressedLeft = keyboardPress == KeyboardPress.Left; keyPressedLeft = keyboardPress == KeyboardPress.Left ? true : keyPressedLeft;
keyPressedRight = keyboardPress == KeyboardPress.Right; keyPressedRight = keyboardPress == KeyboardPress.Right ? true : keyPressedRight;
{ {
TinyPoint tinyPoint2 = keyboardPressed ? createTinyPoint(1, 1) : touchOrClick; TinyPoint tinyPoint2 = keyboardPressed ? createTinyPoint(1, 1) : touchOrClick;
@ -428,6 +428,10 @@ namespace WindowsPhoneSpeedyBlupi
Debug.WriteLine("PadCenter.Y=" + PadCenter.Y); Debug.WriteLine("PadCenter.Y=" + PadCenter.Y);
Debug.WriteLine("padTouchPos.X=" + padTouchPos.X); Debug.WriteLine("padTouchPos.X=" + padTouchPos.X);
Debug.WriteLine("padTouchPos.Y=" + padTouchPos.Y); Debug.WriteLine("padTouchPos.Y=" + padTouchPos.Y);
Debug.WriteLine("keyPressedUp=" + keyPressedUp);
Debug.WriteLine("keyPressedDown=" + keyPressedDown);
Debug.WriteLine("keyPressedLeft=" + keyPressedLeft);
Debug.WriteLine(" keyPressedRight=" + keyPressedRight);
{ {
if (keyPressedUp) if (keyPressedUp)
{ {