fix: check if keyboard state is null before checking if button is pressed

This commit is contained in:
Nico 2023-05-07 23:35:15 +02:00 committed by Isaac Marovitz
parent b4d055e4e9
commit cfcb9921bc
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1

View file

@ -28,7 +28,7 @@ namespace Ryujinx.Input.Assigner
public bool ShouldCancel()
{
return _keyboardState.IsPressed(Key.Escape);
return _keyboardState?.IsPressed(Key.Escape) == true;
}
public ButtonValue? GetPressedButton()