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:
parent
a10b2c5ff2
commit
77aab9aca3
16 changed files with 200 additions and 32 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue