aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE
diff options
context:
space:
mode:
authoremmauss <emmausssss@gmail.com>2021-06-24 00:09:08 +0000
committerGitHub <noreply@github.com>2021-06-24 02:09:08 +0200
commit77aab9aca302bbe635d94750f57fb9a1ad910b74 (patch)
tree67b37d83d194169a6b6a4a98914c761b8f7b8a77 /Ryujinx.HLE
parenta10b2c5ff26886e9ffc6f19e3f0fe9505a503b2f (diff)
Add Direct Mouse Support (#2374)
* and direct mouse support * and direct mouse support * hide cursor if mouse enabled * add config * update docs * sorted usings
Diffstat (limited to 'Ryujinx.HLE')
-rw-r--r--Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs b/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs
index e07c1d20..66d1b0c4 100644
--- a/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs
+++ b/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs
@@ -7,7 +7,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
{
public MouseDevice(Switch device, bool active) : base(device, active) { }
- public void Update(int mouseX, int mouseY, uint buttons = 0, int scrollX = 0, int scrollY = 0)
+ public void Update(int mouseX, int mouseY, uint buttons = 0, int scrollX = 0, int scrollY = 0, bool connected = false)
{
ref RingLifo<MouseState> lifo = ref _device.Hid.SharedMemory.Mouse;
@@ -27,6 +27,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
newState.DeltaY = mouseY - previousEntry.DeltaY;
newState.WheelDeltaX = scrollX;
newState.WheelDeltaY = scrollY;
+ newState.Attributes = connected ? MouseAttribute.IsConnected : MouseAttribute.None;
}
lifo.Write(ref newState);