using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Input;
using System;
using System.Drawing;
using System.Numerics;
namespace Ryujinx.Ava.Input
{
internal class AvaloniaMouse : IMouse
private AvaloniaMouseDriver _driver;
public GamepadFeaturesFlag Features => throw new NotImplementedException();
public string Id => "0";
public string Name => "AvaloniaMouse";
public bool IsConnected => true;
public bool[] Buttons => _driver.PressedButtons;
public AvaloniaMouse(AvaloniaMouseDriver driver)
_driver = driver;
}
public Size ClientSize => _driver.GetClientSize();
public Vector2 GetPosition()
return _driver.CurrentPosition;
public Vector2 GetScroll()
return _driver.Scroll;
public GamepadStateSnapshot GetMappedStateSnapshot()
throw new NotImplementedException();
public Vector3 GetMotionData(MotionInputId inputId)
public GamepadStateSnapshot GetStateSnapshot()
public (float, float) GetStick(StickInputId inputId)
public bool IsButtonPressed(MouseButton button)
return _driver.IsButtonPressed(button);
public bool IsPressed(GamepadButtonInputId inputId)
public void Rumble(float lowFrequency, float highFrequency, uint durationMs)
public void SetConfiguration(InputConfig configuration)
public void SetTriggerThreshold(float triggerThreshold)
public void Dispose()
_driver = null;