aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2024-04-28 17:55:37 +0100
committerGitHub <noreply@github.com>2024-04-28 18:55:37 +0200
commit3d4dea624da2cac015b9d86eb8c2360ab7e8df58 (patch)
tree2c10e9d762bf3be6b2d55d47e64e9684537b1fcc /src
parent89a274c6a6971268aa606c64e9054596b08e0b48 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs
index b2dd3fea..2e62d206 100644
--- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs
@@ -23,8 +23,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
newState.Buttons = (MouseButton)buttons;
newState.X = mouseX;
newState.Y = mouseY;
- newState.DeltaX = mouseX - previousEntry.DeltaX;
- newState.DeltaY = mouseY - previousEntry.DeltaY;
+ newState.DeltaX = mouseX - previousEntry.X;
+ newState.DeltaY = mouseY - previousEntry.Y;
newState.WheelDeltaX = scrollX;
newState.WheelDeltaY = scrollY;
newState.Attributes = connected ? MouseAttribute.IsConnected : MouseAttribute.None;