using Ryujinx.Common.Configuration.Hid.Controller.Motion;
using System;
using System.ComponentModel;
using System.Text.Json.Serialization;
using NotImplementedException = System.NotImplementedException;
namespace Ryujinx.Common.Configuration.Hid.Controller
{
public class GenericControllerInputConfig<Button, Stick> : GenericInputConfigurationCommon<Button> where Button : unmanaged where Stick : unmanaged
[JsonIgnore]
private float _deadzoneLeft;
private float _deadzoneRight;
private float _triggerThreshold;
/// <summary>
/// Left JoyCon Controller Stick Bindings
/// </summary>
public JoyconConfigControllerStick<Button, Stick> LeftJoyconStick { get; set; }
/// Right JoyCon Controller Stick Bindings
public JoyconConfigControllerStick<Button, Stick> RightJoyconStick { get; set; }
/// Controller Left Analog Stick Deadzone
public float DeadzoneLeft
get => _deadzoneLeft; set
_deadzoneLeft = MathF.Round(value, 3);
OnPropertyChanged();
}
/// Controller Right Analog Stick Deadzone
public float DeadzoneRight
get => _deadzoneRight; set
_deadzoneRight = MathF.Round(value, 3);
/// Controller Left Analog Stick Range
public float RangeLeft { get; set; }
/// Controller Right Analog Stick Range
public float RangeRight { get; set; }
/// Controller Trigger Threshold
public float TriggerThreshold
get => _triggerThreshold; set
_triggerThreshold = MathF.Round(value, 3);
/// Controller Motion Settings
public MotionConfigController Motion { get; set; }
/// Controller Rumble Settings
public RumbleConfigController Rumble { get; set; }