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
parent aecf36276e
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)
{
_controllers[(int)inputConfig.PlayerIndex].GamepadDriver.Clear();
_controllers[(int)inputConfig.PlayerIndex].GamepadDriver?.Clear();
}
_blockInputUpdates = false;

View file

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