Use the Joystick interface for game controller input. (#737)

* switch gamepad input to joystick

* fix style nits

* modify config.md to reflect new changes
This commit is contained in:
emmauss 2019-08-05 21:58:27 +03:00 committed by Ac_K
parent 54b79dffa8
commit 1ba58e9942
6 changed files with 239 additions and 219 deletions

View file

@ -135,7 +135,7 @@ namespace Ryujinx
/// <summary>
/// Controller control bindings
/// </summary>
public UI.Input.NpadController GamepadControls { get; private set; }
public UI.Input.NpadController JoystickControls { get; private set; }
/// <summary>
/// Loads a configuration file from disk
@ -246,11 +246,11 @@ namespace Ryujinx
ServiceConfiguration.IgnoreMissingServices = Instance.IgnoreMissingServices;
if (Instance.GamepadControls.Enabled)
if (Instance.JoystickControls.Enabled)
{
if (GamePad.GetName(Instance.GamepadControls.Index) == "Unmapped Controller")
if (!Joystick.GetState(Instance.JoystickControls.Index).IsConnected)
{
Instance.GamepadControls.SetEnabled(false);
Instance.JoystickControls.SetEnabled(false);
}
}