added function to handle gamepad led while in settings; added rainbow color handling in the new function.
This commit is contained in:
parent
fd9bce0f6b
commit
38ecb3d5bc
@ -19,7 +19,6 @@ using Ryujinx.Common.Logging;
|
|||||||
using Ryujinx.Common.SystemInterop;
|
using Ryujinx.Common.SystemInterop;
|
||||||
using Ryujinx.Graphics.Vulkan.MoltenVK;
|
using Ryujinx.Graphics.Vulkan.MoltenVK;
|
||||||
using Ryujinx.Headless;
|
using Ryujinx.Headless;
|
||||||
using Ryujinx.Input.SDL2;
|
|
||||||
using Ryujinx.SDL2.Common;
|
using Ryujinx.SDL2.Common;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -379,6 +379,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
LoadDevice();
|
LoadDevice();
|
||||||
_isLoaded = true;
|
_isLoaded = true;
|
||||||
|
|
||||||
|
UpdateGamepadLed();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateGamepadLed()
|
||||||
|
{
|
||||||
if (ConfigViewModel is not ControllerInputViewModel controllerInputViewModel) return;
|
if (ConfigViewModel is not ControllerInputViewModel controllerInputViewModel) return;
|
||||||
GamepadInputConfig inputConfig = controllerInputViewModel.Config;
|
GamepadInputConfig inputConfig = controllerInputViewModel.Config;
|
||||||
|
|
||||||
@ -388,11 +394,14 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
{
|
{
|
||||||
SelectedGamepad.ClearLed();
|
SelectedGamepad.ClearLed();
|
||||||
}
|
}
|
||||||
|
else if(inputConfig.UseRainbowLed)
|
||||||
|
{
|
||||||
|
SelectedGamepad.SetLed((uint)Rainbow.Color.ToArgb());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SelectedGamepad.SetLed(inputConfig.LedColor.ToUInt32());
|
SelectedGamepad.SetLed(inputConfig.LedColor.ToUInt32());
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetCurrentGamepadId()
|
private string GetCurrentGamepadId()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user