minor fixes
This commit is contained in:
parent
538a9c83bd
commit
c6e82046dd
@ -52,7 +52,6 @@ namespace Ryujinx.Ava.Input
|
|||||||
List<InputConfig> newConfig = ControllerAssignmentManager.GetConfiguredControllers(
|
List<InputConfig> newConfig = ControllerAssignmentManager.GetConfiguredControllers(
|
||||||
controllers, oldConfig, out bool hasNewControllersConnected);
|
controllers, oldConfig, out bool hasNewControllersConnected);
|
||||||
|
|
||||||
_viewModel.AppHost?.NpadManager.ReloadConfiguration(newConfig, _configurationState.Hid.EnableKeyboard, _configurationState.Hid.EnableMouse);
|
|
||||||
|
|
||||||
if (!hasNewControllersConnected)
|
if (!hasNewControllersConnected)
|
||||||
{
|
{
|
||||||
@ -62,6 +61,7 @@ namespace Ryujinx.Ava.Input
|
|||||||
newConfig = ControllerAssignmentManager.ReorderControllers(newConfig, oldConfig);
|
newConfig = ControllerAssignmentManager.ReorderControllers(newConfig, oldConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_viewModel.AppHost?.NpadManager.ReloadConfiguration(newConfig, _configurationState.Hid.EnableKeyboard, _configurationState.Hid.EnableMouse);
|
||||||
_configurationState.Hid.InputConfig.Value = newConfig;
|
_configurationState.Hid.InputConfig.Value = newConfig;
|
||||||
|
|
||||||
// we want to save the configuration only if a *new* controller was connected
|
// we want to save the configuration only if a *new* controller was connected
|
||||||
|
@ -14,8 +14,8 @@ namespace Ryujinx.Ava.Input
|
|||||||
{
|
{
|
||||||
private static readonly uint[] _playerColors =
|
private static readonly uint[] _playerColors =
|
||||||
[
|
[
|
||||||
0xFFFF0000, // Player 1 - Red
|
0xFF0000FF, // Player 1 - Blue
|
||||||
0xFF0000FF, // Player 2 - Blue
|
0xFFFF0000, // Player 2 - Red
|
||||||
0xFF00FF00, // Player 3 - Green
|
0xFF00FF00, // Player 3 - Green
|
||||||
0xFFFFFF00, // Player 4 - Yellow
|
0xFFFFFF00, // Player 4 - Yellow
|
||||||
0xFFFF00FF, // Player 5 - Magenta
|
0xFFFF00FF, // Player 5 - Magenta
|
||||||
@ -28,6 +28,8 @@ namespace Ryujinx.Ava.Input
|
|||||||
|
|
||||||
public static List<InputConfig> ReorderControllers(List<InputConfig> newConfig, List<InputConfig> oldConfig)
|
public static List<InputConfig> ReorderControllers(List<InputConfig> newConfig, List<InputConfig> oldConfig)
|
||||||
{
|
{
|
||||||
|
if(newConfig == null || oldConfig == null || newConfig.Count == 0 || oldConfig.Count == 0) return [];
|
||||||
|
|
||||||
List<InputConfig> reorderedConfig = oldConfig.Select(config => new GamepadInputConfig(config).GetConfig()).ToList();
|
List<InputConfig> reorderedConfig = oldConfig.Select(config => new GamepadInputConfig(config).GetConfig()).ToList();
|
||||||
|
|
||||||
foreach (var config in newConfig)
|
foreach (var config in newConfig)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user