Feature: Auto-Assign Controllers #706

Open
uncavo-hdmi wants to merge 31 commits from uncavo-hdmi/auto-assign-controller into master
Showing only changes of commit 9cccaac9d3 - Show all commits

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;