mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-19 00:12:00 +00:00
40daca5684
* dotnet format style --severity info Some changes were manually reverted. * dotnet format analyzers --serverity info Some changes have been minimally adapted. * Restore a few unused methods and variables * Address or silence dotnet format CA1806 and a few CA1854 warnings * Address most dotnet format whitespace warnings * Apply dotnet format whitespace formatting A few of them have been manually reverted and the corresponding warning was silenced * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas" This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e. * dotnet format whitespace after rebase * First dotnet format pass * Add trailing commas * Fix naming and formatting issues
90 lines
2.1 KiB
C#
90 lines
2.1 KiB
C#
using Ryujinx.Common.Configuration.Hid;
|
|
using Ryujinx.Input;
|
|
using System;
|
|
using System.Drawing;
|
|
using System.Numerics;
|
|
|
|
namespace Ryujinx.Headless.SDL2
|
|
{
|
|
class SDL2Mouse : IMouse
|
|
{
|
|
private SDL2MouseDriver _driver;
|
|
|
|
public GamepadFeaturesFlag Features => throw new NotImplementedException();
|
|
|
|
public string Id => "0";
|
|
|
|
public string Name => "SDL2Mouse";
|
|
|
|
public bool IsConnected => true;
|
|
|
|
public bool[] Buttons => _driver.PressedButtons;
|
|
|
|
Size IMouse.ClientSize => _driver.GetClientSize();
|
|
|
|
public SDL2Mouse(SDL2MouseDriver driver)
|
|
{
|
|
_driver = driver;
|
|
}
|
|
|
|
public Vector2 GetPosition()
|
|
{
|
|
return _driver.CurrentPosition;
|
|
}
|
|
|
|
public Vector2 GetScroll()
|
|
{
|
|
return _driver.Scroll;
|
|
}
|
|
|
|
public GamepadStateSnapshot GetMappedStateSnapshot()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Vector3 GetMotionData(MotionInputId inputId)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public GamepadStateSnapshot GetStateSnapshot()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public (float, float) GetStick(StickInputId inputId)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public bool IsButtonPressed(MouseButton button)
|
|
{
|
|
return _driver.IsButtonPressed(button);
|
|
}
|
|
|
|
public bool IsPressed(GamepadButtonInputId inputId)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public void Rumble(float lowFrequency, float highFrequency, uint durationMs)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public void SetConfiguration(InputConfig configuration)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public void SetTriggerThreshold(float triggerThreshold)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
_driver = null;
|
|
}
|
|
}
|
|
}
|