fixed led live update while in settings
This commit is contained in:
parent
b8cb70ef32
commit
fd9bce0f6b
@ -94,6 +94,8 @@ namespace Ryujinx.Ava.Input
|
|||||||
{
|
{
|
||||||
desiredIndex = GetFirstAvailableIndex(usedIndices);
|
desiredIndex = GetFirstAvailableIndex(usedIndices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(desiredIndex == -1) continue;
|
||||||
|
|
||||||
InputConfig config = new GamepadInputConfig(existingConfig).GetConfig();
|
InputConfig config = new GamepadInputConfig(existingConfig).GetConfig();
|
||||||
config.PlayerIndex = (PlayerIndex)desiredIndex;
|
config.PlayerIndex = (PlayerIndex)desiredIndex;
|
||||||
|
@ -375,10 +375,23 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
Dispatcher.UIThread.Post(() => {
|
Dispatcher.UIThread.Post(() => {
|
||||||
LoadDevices();
|
LoadDevices();
|
||||||
_isLoaded = false;
|
_isLoaded = false;
|
||||||
LoadConfiguration();
|
LoadConfiguration();
|
||||||
LoadDevice();
|
LoadDevice();
|
||||||
_isLoaded = true;
|
_isLoaded = true;
|
||||||
NotifyChanges();
|
|
||||||
|
if (ConfigViewModel is not ControllerInputViewModel controllerInputViewModel) return;
|
||||||
|
GamepadInputConfig inputConfig = controllerInputViewModel.Config;
|
||||||
|
|
||||||
|
if (inputConfig is not { EnableLedChanging: true }) return;
|
||||||
|
|
||||||
|
if (inputConfig.TurnOffLed)
|
||||||
|
{
|
||||||
|
SelectedGamepad.ClearLed();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SelectedGamepad.SetLed(inputConfig.LedColor.ToUInt32());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user