Update SDL2Gamepad.cs
This commit is contained in:
parent
96e9e3611d
commit
898153ae13
@ -78,8 +78,6 @@ namespace Ryujinx.Input.SDL2
|
|||||||
|
|
||||||
private float _triggerThreshold;
|
private float _triggerThreshold;
|
||||||
|
|
||||||
private uint _rawColor;
|
|
||||||
|
|
||||||
public SDL2Gamepad(nint gamepadHandle, string driverId)
|
public SDL2Gamepad(nint gamepadHandle, string driverId)
|
||||||
{
|
{
|
||||||
_gamepadHandle = gamepadHandle;
|
_gamepadHandle = gamepadHandle;
|
||||||
@ -89,11 +87,6 @@ namespace Ryujinx.Input.SDL2
|
|||||||
Id = driverId;
|
Id = driverId;
|
||||||
Features = GetFeaturesFlag();
|
Features = GetFeaturesFlag();
|
||||||
_triggerThreshold = 0.0f;
|
_triggerThreshold = 0.0f;
|
||||||
|
|
||||||
//if (Features.HasFlag(GamepadFeaturesFlag.Led))
|
|
||||||
{
|
|
||||||
SetLedColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enable motion tracking
|
// Enable motion tracking
|
||||||
if (Features.HasFlag(GamepadFeaturesFlag.Motion))
|
if (Features.HasFlag(GamepadFeaturesFlag.Motion))
|
||||||
@ -112,8 +105,9 @@ namespace Ryujinx.Input.SDL2
|
|||||||
|
|
||||||
public void SetLedColor()
|
public void SetLedColor()
|
||||||
{
|
{
|
||||||
//uint rawColor = 0;
|
if (!HasConfiguration) return;
|
||||||
//_rawColor = _configuration.Led.LedColor;
|
|
||||||
|
uint _rawColor = _configuration.Led.LedColor;
|
||||||
byte red = (byte)(_rawColor >> 16);
|
byte red = (byte)(_rawColor >> 16);
|
||||||
byte green = (byte)(_rawColor >> 8);
|
byte green = (byte)(_rawColor >> 8);
|
||||||
byte blue = (byte)(_rawColor % 256);
|
byte blue = (byte)(_rawColor % 256);
|
||||||
@ -239,8 +233,8 @@ namespace Ryujinx.Input.SDL2
|
|||||||
{
|
{
|
||||||
_configuration = (StandardControllerInputConfig)configuration;
|
_configuration = (StandardControllerInputConfig)configuration;
|
||||||
|
|
||||||
_rawColor = _configuration.Led.LedColor;
|
if (Features.HasFlag(GamepadFeaturesFlag.Led))
|
||||||
SetLedColor();
|
SetLedColor();
|
||||||
|
|
||||||
_buttonsUserMapping.Clear();
|
_buttonsUserMapping.Clear();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user