diff options
| author | Luke <44324377+Luke44565@users.noreply.github.com> | 2024-04-15 17:02:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-15 18:02:09 -0300 |
| commit | 8884d1fd732c9ba788f0ab711e6a9f507d934ac8 (patch) | |
| tree | 0578d27b150dded33e557bebf3cafe80bf2ff7ed /src | |
| parent | 268c9aecf8e9181bb7114cf1dd826f00b2237714 (diff) | |
Fix crash when changing controller config (#6654)
* fix needsMotionInputUpdate conditions
* Fix formatting
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
---------
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/Ryujinx.Input/HLE/NpadController.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Ryujinx.Input/HLE/NpadController.cs b/src/Ryujinx.Input/HLE/NpadController.cs index f00db94e..8411c10a 100644 --- a/src/Ryujinx.Input/HLE/NpadController.cs +++ b/src/Ryujinx.Input/HLE/NpadController.cs @@ -245,9 +245,9 @@ namespace Ryujinx.Input.HLE { if (config is StandardControllerInputConfig controllerConfig) { - bool needsMotionInputUpdate = _config == null || (_config is StandardControllerInputConfig oldControllerConfig && - (oldControllerConfig.Motion.EnableMotion != controllerConfig.Motion.EnableMotion) && - (oldControllerConfig.Motion.MotionBackend != controllerConfig.Motion.MotionBackend)); + bool needsMotionInputUpdate = _config is not StandardControllerInputConfig oldControllerConfig || + ((oldControllerConfig.Motion.EnableMotion != controllerConfig.Motion.EnableMotion) && + (oldControllerConfig.Motion.MotionBackend != controllerConfig.Motion.MotionBackend)); if (needsMotionInputUpdate) { |
