From 1b037ca33dae10d81b42b9d36e4a3fef1dc8dde6 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Thu, 18 May 2023 17:47:43 -0400 Subject: [PATCH] Fix more stupid mistakes --- .../UI/Models/Input/ControllerInputConfig.cs | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/Ryujinx.Ava/UI/Models/Input/ControllerInputConfig.cs b/src/Ryujinx.Ava/UI/Models/Input/ControllerInputConfig.cs index 0826f9212..a1e27025b 100644 --- a/src/Ryujinx.Ava/UI/Models/Input/ControllerInputConfig.cs +++ b/src/Ryujinx.Ava/UI/Models/Input/ControllerInputConfig.cs @@ -533,13 +533,13 @@ namespace Ryujinx.Ava.UI.Models.Input AltSlot = cemuHook.AltSlot; MirrorInput = cemuHook.MirrorInput; } + } - if (controllerInput.Rumble != null) - { - EnableRumble = controllerInput.Rumble.EnableRumble; - WeakRumble = controllerInput.Rumble.WeakRumble; - StrongRumble = controllerInput.Rumble.StrongRumble; - } + if (controllerInput.Rumble != null) + { + EnableRumble = controllerInput.Rumble.EnableRumble; + WeakRumble = controllerInput.Rumble.WeakRumble; + StrongRumble = controllerInput.Rumble.StrongRumble; } } } @@ -598,6 +598,13 @@ namespace Ryujinx.Ava.UI.Models.Input WeakRumble = WeakRumble, StrongRumble = StrongRumble }, + Motion = new MotionConfigController + { + EnableMotion = EnableMotion, + MotionBackend = MotionBackend, + GyroDeadzone = GyroDeadzone, + Sensitivity = Sensitivity, + }, Version = InputConfig.CurrentVersion, DeadzoneLeft = DeadzoneLeft, DeadzoneRight = DeadzoneRight, @@ -606,9 +613,16 @@ namespace Ryujinx.Ava.UI.Models.Input TriggerThreshold = TriggerThreshold, }; - config.Motion.Sensitivity = Sensitivity; - config.Motion.EnableMotion = EnableMotion; - config.Motion.GyroDeadzone = GyroDeadzone; + if (EnableCemuHookMotion) + { + var cemuHook = (CemuHookMotionConfigController)config.Motion; + cemuHook.DsuServerHost = DsuServerHost; + cemuHook.DsuServerPort = DsuServerPort; + cemuHook.Slot = Slot; + cemuHook.AltSlot = AltSlot; + cemuHook.MirrorInput = MirrorInput; + config.Motion = cemuHook; + } return config; }