From 5ab5e042aaaf3233d42c30c76aa83039625cc122 Mon Sep 17 00:00:00 2001 From: Otozinclus Date: Sat, 25 Jan 2025 23:33:01 +0100 Subject: [PATCH 1/5] 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()); + } } } } -- 2.47.1 From 978a8e79a465cad0321ec68bcf740bc3a49c2576 Mon Sep 17 00:00:00 2001 From: Otozinclus Date: Sat, 25 Jan 2025 23:38:58 +0100 Subject: [PATCH 2/5] Step 2, fixing the issue --- .../UI/Views/Input/ControllerInputView.axaml.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs index 9a2f062a8..d5447906b 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; - + if (cVm.Config.TurnOffLed) return; cVm.ParentModel.SelectedGamepad.SetLed(args.NewColor.Value.ToUInt32()); } @@ -259,14 +259,8 @@ namespace Ryujinx.Ava.UI.Views.Input { if (DataContext is not ControllerInputViewModel cVm) return; if (!cVm.Config.EnableLedChanging) return; - if (cVm.Config.TurnOffLed) - { - cVm.ParentModel.SelectedGamepad.ClearLed(); - } - else - { - cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32()); - } + if (cVm.Config.TurnOffLed) return; + cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32()); } } } -- 2.47.1 From f9130ffc538656dbf6f30ed85947a505e62983f8 Mon Sep 17 00:00:00 2001 From: Otozinclus Date: Sat, 25 Jan 2025 23:40:02 +0100 Subject: [PATCH 3/5] restore prior formatting --- src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs index dcb81a664..99ac3f008 100644 --- a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs +++ b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs @@ -253,6 +253,7 @@ namespace Ryujinx.Ava.UI.Views.Input if (DataContext is not ControllerInputViewModel cVm) return; if (!cVm.Config.EnableLedChanging) return; if (cVm.Config.TurnOffLed) return; + cVm.ParentModel.SelectedGamepad.SetLed(args.NewColor.Value.ToUInt32()); } @@ -261,6 +262,7 @@ namespace Ryujinx.Ava.UI.Views.Input if (DataContext is not ControllerInputViewModel cVm) return; if (!cVm.Config.EnableLedChanging) return; if (cVm.Config.TurnOffLed) return; + cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32()); } } -- 2.47.1 From e400fdd16831914638891032197c757a17d4bb65 Mon Sep 17 00:00:00 2001 From: Otozinclus Date: Sat, 25 Jan 2025 23:41:57 +0100 Subject: [PATCH 4/5] restore prior formatting 1 --- src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs index 99ac3f008..9ecb08934 100644 --- a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs +++ b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs @@ -262,7 +262,6 @@ namespace Ryujinx.Ava.UI.Views.Input if (DataContext is not ControllerInputViewModel cVm) return; if (!cVm.Config.EnableLedChanging) return; if (cVm.Config.TurnOffLed) return; - cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32()); } } -- 2.47.1 From 211763c9551ed0162aca03737f168582df482af6 Mon Sep 17 00:00:00 2001 From: Otozinclus Date: Sat, 25 Jan 2025 23:42:17 +0100 Subject: [PATCH 5/5] I had to do this in 2 steps don't ask --- src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs index 9ecb08934..99ac3f008 100644 --- a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs +++ b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs @@ -262,6 +262,7 @@ namespace Ryujinx.Ava.UI.Views.Input if (DataContext is not ControllerInputViewModel cVm) return; if (!cVm.Config.EnableLedChanging) return; if (cVm.Config.TurnOffLed) return; + cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32()); } } -- 2.47.1