mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-18 00:16:56 +00:00
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>
This commit is contained in:
parent
268c9aecf8
commit
8884d1fd73
1 changed files with 3 additions and 3 deletions
|
@ -245,8 +245,8 @@ namespace Ryujinx.Input.HLE
|
||||||
{
|
{
|
||||||
if (config is StandardControllerInputConfig controllerConfig)
|
if (config is StandardControllerInputConfig controllerConfig)
|
||||||
{
|
{
|
||||||
bool needsMotionInputUpdate = _config == null || (_config is StandardControllerInputConfig oldControllerConfig &&
|
bool needsMotionInputUpdate = _config is not StandardControllerInputConfig oldControllerConfig ||
|
||||||
(oldControllerConfig.Motion.EnableMotion != controllerConfig.Motion.EnableMotion) &&
|
((oldControllerConfig.Motion.EnableMotion != controllerConfig.Motion.EnableMotion) &&
|
||||||
(oldControllerConfig.Motion.MotionBackend != controllerConfig.Motion.MotionBackend));
|
(oldControllerConfig.Motion.MotionBackend != controllerConfig.Motion.MotionBackend));
|
||||||
|
|
||||||
if (needsMotionInputUpdate)
|
if (needsMotionInputUpdate)
|
||||||
|
|
Loading…
Reference in a new issue