Преглед на файлове

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.
riperiperi преди 2 години
родител
ревизия
3d4dea624d
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs

+ 2 - 2
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;