Clear the driver state only if the GamepadDriver isn't null

This commit is contained in:
TSR Berry 2024-05-15 15:31:31 +02:00
commit a89bab00c5
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
2 changed files with 2 additions and 2 deletions

View file

@ -176,7 +176,7 @@ namespace Ryujinx.Input.HLE
{ {
foreach (InputConfig inputConfig in _inputConfig) foreach (InputConfig inputConfig in _inputConfig)
{ {
_controllers[(int)inputConfig.PlayerIndex].GamepadDriver.Clear(); _controllers[(int)inputConfig.PlayerIndex].GamepadDriver?.Clear();
} }
_blockInputUpdates = false; _blockInputUpdates = false;

View file

@ -35,7 +35,7 @@ namespace Ryujinx.Input
IGamepad GetGamepad(string id); IGamepad GetGamepad(string id);
/// <summary> /// <summary>
/// Flush the internal state of the driver. /// Clear the internal state of the driver.
/// </summary> /// </summary>
/// <remarks>Does nothing by default.</remarks> /// <remarks>Does nothing by default.</remarks>
void Clear() { } void Clear() { }