ProController.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. namespace Ryujinx.HLE.Input
  2. {
  3. public class ProController : BaseController
  4. {
  5. private bool _wired = false;
  6. private NpadColor _bodyColor;
  7. private NpadColor _buttonColor;
  8. public ProController(Switch device,
  9. NpadColor bodyColor,
  10. NpadColor buttonColor) : base(device, ControllerStatus.ProController)
  11. {
  12. _wired = true;
  13. _bodyColor = bodyColor;
  14. _buttonColor = buttonColor;
  15. }
  16. public override void Connect(ControllerId controllerId)
  17. {
  18. ControllerColorDescription singleColorDesc =
  19. ControllerColorDescription.ColorDescriptionColorsNonexistent;
  20. ControllerColorDescription splitColorDesc = 0;
  21. ConnectionState = ControllerConnectionState.ControllerStateConnected | ControllerConnectionState.ControllerStateWired;
  22. Initialize(false,
  23. (0, 0),
  24. (0, 0),
  25. singleColorDesc,
  26. splitColorDesc,
  27. _bodyColor,
  28. _buttonColor);
  29. base.Connect(controllerId);
  30. SetLayout(ControllerLayouts.ProController);
  31. }
  32. }
  33. }