Add Direct Mouse Support (#2374)
* and direct mouse support * and direct mouse support * hide cursor if mouse enabled * add config * update docs * sorted usings
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user