InputConfig.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.ComponentModel;
  2. using System.Runtime.CompilerServices;
  3. using System.Text.Json.Serialization;
  4. namespace Ryujinx.Common.Configuration.Hid
  5. {
  6. [JsonConverter(typeof(JsonInputConfigConverter))]
  7. public class InputConfig : INotifyPropertyChanged
  8. {
  9. /// <summary>
  10. /// The current version of the input file format
  11. /// </summary>
  12. public const int CurrentVersion = 1;
  13. public int Version { get; set; }
  14. public InputBackendType Backend { get; set; }
  15. /// <summary>
  16. /// Controller id
  17. /// </summary>
  18. public string Id { get; set; }
  19. /// <summary>
  20. /// Controller's Type
  21. /// </summary>
  22. public ControllerType ControllerType { get; set; }
  23. /// <summary>
  24. /// Player's Index for the controller
  25. /// </summary>
  26. public PlayerIndex PlayerIndex { get; set; }
  27. public event PropertyChangedEventHandler PropertyChanged;
  28. protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
  29. {
  30. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  31. }
  32. }
  33. }