mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-07 22:36:27 +02:00
Fully disconnect gamepad handler for rainbow color if configuration is set with UseRainbowLed false
Also check if its even enabled before setting the rainbow color Fixes strobing
This commit is contained in:
parent
1ce37ec317
commit
3541e282ea
2 changed files with 24 additions and 3 deletions
|
@ -226,6 +226,13 @@ namespace Ryujinx.Input.SDL2
|
|||
|
||||
private static Vector3 GsToMs2(Vector3 gs) => gs / SDL_STANDARD_GRAVITY;
|
||||
|
||||
private void RainbowColorChanged(int packedRgb)
|
||||
{
|
||||
if (!_configuration.Led.UseRainbow) return;
|
||||
|
||||
SetLed((uint)packedRgb);
|
||||
}
|
||||
|
||||
public void SetConfiguration(InputConfig configuration)
|
||||
{
|
||||
lock (_userMappingLock)
|
||||
|
@ -237,10 +244,12 @@ namespace Ryujinx.Input.SDL2
|
|||
if (_configuration.Led.TurnOffLed)
|
||||
(this as IGamepad).ClearLed();
|
||||
else if (_configuration.Led.UseRainbow)
|
||||
Rainbow.RainbowColorUpdated += clr => SetLed((uint)clr);
|
||||
Rainbow.RainbowColorUpdated += RainbowColorChanged;
|
||||
else
|
||||
SetLed(_configuration.Led.LedColor);
|
||||
|
||||
if (!_configuration.Led.UseRainbow)
|
||||
Rainbow.RainbowColorUpdated -= RainbowColorChanged;
|
||||
}
|
||||
|
||||
_buttonsUserMapping.Clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue