mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-30 20:54:30 +01:00
HID: Correct direct mouse deltas (#6736)
The delta position of the mouse should be the difference between the current and last position. Subtracting the last deltas doesn't really make sense. Won't implement pointer lock for first person games, but might stop some super weird behaviour with the mouse values appearing totally random.
This commit is contained in:
parent
89a274c6a6
commit
3d4dea624d
@ -23,8 +23,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
newState.Buttons = (MouseButton)buttons;
|
newState.Buttons = (MouseButton)buttons;
|
||||||
newState.X = mouseX;
|
newState.X = mouseX;
|
||||||
newState.Y = mouseY;
|
newState.Y = mouseY;
|
||||||
newState.DeltaX = mouseX - previousEntry.DeltaX;
|
newState.DeltaX = mouseX - previousEntry.X;
|
||||||
newState.DeltaY = mouseY - previousEntry.DeltaY;
|
newState.DeltaY = mouseY - previousEntry.Y;
|
||||||
newState.WheelDeltaX = scrollX;
|
newState.WheelDeltaX = scrollX;
|
||||||
newState.WheelDeltaY = scrollY;
|
newState.WheelDeltaY = scrollY;
|
||||||
newState.Attributes = connected ? MouseAttribute.IsConnected : MouseAttribute.None;
|
newState.Attributes = connected ? MouseAttribute.IsConnected : MouseAttribute.None;
|
||||||
|
Loading…
Reference in New Issue
Block a user