1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

Fixed InputHandler.InputsPressed ignoring repeat events for keyboards and gamepads

This commit is contained in:
Ell 2022-03-24 11:43:55 +01:00
parent c5b2b8798e
commit bb7192b3cc
2 changed files with 2 additions and 1 deletions

View file

@ -29,6 +29,7 @@ Fixes
- **Fixed a formatting Code only knowing about the last Token that it is applied in** - **Fixed a formatting Code only knowing about the last Token that it is applied in**
- Fixed Code.Draw receiving the index in the current line rather than the current token - Fixed Code.Draw receiving the index in the current line rather than the current token
- Fixed StaticSpriteBatch handling rotated sprites incorrectly - Fixed StaticSpriteBatch handling rotated sprites incorrectly
- Fixed InputHandler.InputsPressed ignoring repeat events for keyboards and gamepads
Removals Removals
- Renamed GenericFont.OneEmSpace to Emsp (and marked OneEmSpace as obsolete) - Renamed GenericFont.OneEmSpace to Emsp (and marked OneEmSpace as obsolete)

View file

@ -313,7 +313,7 @@ namespace MLEM.Input {
this.InputsPressed = Array.Empty<GenericInput>(); this.InputsPressed = Array.Empty<GenericInput>();
this.InputsDown = Array.Empty<GenericInput>(); this.InputsDown = Array.Empty<GenericInput>();
} else { } else {
this.InputsPressed = this.inputsDownAccum.Where(i => !this.InputsDown.Contains(i)).ToArray(); this.InputsPressed = this.inputsDownAccum.Where(this.IsPressed).ToArray();
this.InputsDown = this.inputsDownAccum.ToArray(); this.InputsDown = this.inputsDownAccum.ToArray();
this.inputsDownAccum.Clear(); this.inputsDownAccum.Clear();
} }