EverestAPI / EverestAPI/Everest
Handle MInput.MouseData.WheelDelta jumps when changing window focus or opening commands
- Dominant language
- C#
- Stars
- 516
- Forks
- 106
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 5
Description
### I am planning on implementing this myself
No
### Describe your request
`MInput.MouseData.UpdateNull()` gives its ``MouseState``s their default values, that when updated normally via `MInput.MouseData.Update()` causes a large `MInput.MouseData.WheelDelta` as the actual polled mouse state scroll value will be very different from the previous default struct value.
I don't know the extent of removing the default value assignments entirely, but keeping the non-default scroll values around would fix this.
Additionally, while `MInput` does not update its input values when the window is unfocused or the commands menu is opened, the XNA/FNA side of things does. This allows the user to scroll the mousewheel with the game unfocused/commands opened, and only when switching back `MInput.Update()` runs, which may result in very different scroll values, i.e. a large `MInput.MouseData.WheelDelta`. Setting `MouseData.PreviousState` to `MouseData.CurrentState` when the window gains focus/commands are closed (before `MInput.Update()`) would fix the remaining issue.
These *are* slightly hacky solutions, but it's what I can think of.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.