Little rewrite of HID input (#723)
* change hid sharedmem writing to use structures
This commit is contained in:
parent
1f3a34dd7a
commit
d254548548
42 changed files with 682 additions and 409 deletions
42
Ryujinx.HLE/Input/Controller/ProController.cs
Normal file
42
Ryujinx.HLE/Input/Controller/ProController.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
namespace Ryujinx.HLE.Input
|
||||
{
|
||||
public class ProController : BaseController
|
||||
{
|
||||
private bool _wired = false;
|
||||
|
||||
private NpadColor _bodyColor;
|
||||
private NpadColor _buttonColor;
|
||||
|
||||
public ProController(Switch device,
|
||||
NpadColor bodyColor,
|
||||
NpadColor buttonColor) : base(device, ControllerStatus.ProController)
|
||||
{
|
||||
_wired = true;
|
||||
|
||||
_bodyColor = bodyColor;
|
||||
_buttonColor = buttonColor;
|
||||
}
|
||||
|
||||
public override void Connect(ControllerId controllerId)
|
||||
{
|
||||
ControllerColorDescription singleColorDesc =
|
||||
ControllerColorDescription.ColorDescriptionColorsNonexistent;
|
||||
|
||||
ControllerColorDescription splitColorDesc = 0;
|
||||
|
||||
ConnectionState = ControllerConnectionState.ControllerStateConnected | ControllerConnectionState.ControllerStateWired;
|
||||
|
||||
Initialize(false,
|
||||
(0, 0),
|
||||
(0, 0),
|
||||
singleColorDesc,
|
||||
splitColorDesc,
|
||||
_bodyColor,
|
||||
_buttonColor);
|
||||
|
||||
base.Connect(controllerId);
|
||||
|
||||
SetLayout(ControllerLayouts.ProController);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue