Fix LED turning on in input settings, despite TurnOffLed being set to true #583

Merged
Otozinclus merged 6 commits from Fix-Led-turning-on-in-Input-Settings-despite-turn-off-Led-being-true into master 2025-01-25 23:15:17 +00:00
Showing only changes of commit 5ab5e042aa - Show all commits

View File

@ -251,7 +251,7 @@ namespace Ryujinx.Ava.UI.Views.Input
if (!args.NewColor.HasValue) return; if (!args.NewColor.HasValue) return;
if (DataContext is not ControllerInputViewModel cVm) return; if (DataContext is not ControllerInputViewModel cVm) return;
if (!cVm.Config.EnableLedChanging) return; if (!cVm.Config.EnableLedChanging) return;
cVm.ParentModel.SelectedGamepad.SetLed(args.NewColor.Value.ToUInt32()); 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 (DataContext is not ControllerInputViewModel cVm) return;
if (!cVm.Config.EnableLedChanging) return; if (!cVm.Config.EnableLedChanging) return;
if (cVm.Config.TurnOffLed)
cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32()); {
cVm.ParentModel.SelectedGamepad.ClearLed();
}
else
{
cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32());
}
} }
} }
} }