From 5ab5e042aaaf3233d42c30c76aa83039625cc122 Mon Sep 17 00:00:00 2001 From: Otozinclus Date: Sat, 25 Jan 2025 23:33:01 +0100 Subject: [PATCH] Step 1 fix controller LED turning on in Input menu, despite TUrnOffLed being true --- .../UI/Views/Input/ControllerInputView.axaml.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs index 81483ce0e..9a2f062a8 100644 --- a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs +++ b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs @@ -251,7 +251,7 @@ namespace Ryujinx.Ava.UI.Views.Input if (!args.NewColor.HasValue) return; if (DataContext is not ControllerInputViewModel cVm) return; if (!cVm.Config.EnableLedChanging) return; - + cVm.ParentModel.SelectedGamepad.SetLed(args.NewColor.Value.ToUInt32()); } @@ -259,8 +259,14 @@ namespace Ryujinx.Ava.UI.Views.Input { if (DataContext is not ControllerInputViewModel cVm) return; if (!cVm.Config.EnableLedChanging) return; - - cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32()); + if (cVm.Config.TurnOffLed) + { + cVm.ParentModel.SelectedGamepad.ClearLed(); + } + else + { + cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32()); + } } } }