minor fix to RefreshControllers logic

This commit is contained in:
uncavo-hdmi 2025-02-02 22:56:34 +01:00
parent 9b7dc6f4ee
commit 9cccaac9d3

View File

@ -46,6 +46,13 @@ namespace Ryujinx.Ava
List<InputConfig> oldConfig = _configurationState.Hid.InputConfig.Value.Where(x => x != null).ToList();
List<InputConfig> newConfig = GetOrderedConfig(controllers, oldConfig);
int index = 0;
foreach (var config in newConfig)
{
config.PlayerIndex = (PlayerIndex)index;
index++;
}
_viewModel.AppHost?.NpadManager.ReloadConfiguration(newConfig, _configurationState.Hid.EnableKeyboard, _configurationState.Hid.EnableMouse);
_configurationState.Hid.InputConfig.Value = newConfig;