From 55f3a4b7ff68b669fd13c7bf85fa31f765f4c42e Mon Sep 17 00:00:00 2001 From: uncavo-hdmi Date: Tue, 18 Feb 2025 14:43:00 +0100 Subject: [PATCH] simplified logic --- .../Input/ControllerAssignmentManager.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Ryujinx/Input/ControllerAssignmentManager.cs b/src/Ryujinx/Input/ControllerAssignmentManager.cs index 9e8bca7bd..11f98a208 100644 --- a/src/Ryujinx/Input/ControllerAssignmentManager.cs +++ b/src/Ryujinx/Input/ControllerAssignmentManager.cs @@ -138,16 +138,18 @@ namespace Ryujinx.Ava.Input { orderedConfigs[index].PlayerIndex = (PlayerIndex)index; - if (orderedConfigs[index] is StandardControllerInputConfig standardConfig) + if (orderedConfigs[index] is not StandardControllerInputConfig standardConfig || + standardConfig.Led.UseRainbow) { - if(standardConfig.Led.UseRainbow) continue; - Logger.Warning?.Print(LogClass.Application, $"Setting color for Player{index + 1}"); - standardConfig.Led = new LedConfigController - { - EnableLed = true, - LedColor = _playerColors[index] - }; + continue; } + + Logger.Warning?.Print(LogClass.Application, $"Setting color for Player{index + 1}"); + standardConfig.Led = new LedConfigController + { + EnableLed = true, + LedColor = _playerColors[index] + }; } }