Propogate those fields i forgot about

This commit is contained in:
Isaac Marovitz 2023-05-18 10:09:20 -04:00 committed by Isaac Marovitz
parent 53bc71f181
commit 281a078773
2 changed files with 93 additions and 85 deletions

View file

@ -474,8 +474,11 @@ namespace Ryujinx.Ava.UI.Models.Input
ControllerType = config.ControllerType; ControllerType = config.ControllerType;
PlayerIndex = config.PlayerIndex; PlayerIndex = config.PlayerIndex;
if (config is StandardControllerInputConfig controllerInput) if (config is not StandardControllerInputConfig controllerInput)
{ {
return;
}
LeftJoystick = controllerInput.LeftJoyconStick.Joystick; LeftJoystick = controllerInput.LeftJoyconStick.Joystick;
LeftInvertStickX = controllerInput.LeftJoyconStick.InvertStickX; LeftInvertStickX = controllerInput.LeftJoyconStick.InvertStickX;
LeftInvertStickY = controllerInput.LeftJoyconStick.InvertStickY; LeftInvertStickY = controllerInput.LeftJoyconStick.InvertStickY;
@ -540,7 +543,6 @@ namespace Ryujinx.Ava.UI.Models.Input
} }
} }
} }
}
public InputConfig GetConfig() public InputConfig GetConfig()
{ {

View file

@ -322,8 +322,15 @@ namespace Ryujinx.Ava.UI.Models.Input
{ {
if (config != null) if (config != null)
{ {
if (config is StandardKeyboardInputConfig keyboardConfig) Id = config.Id;
ControllerType = config.ControllerType;
PlayerIndex = config.PlayerIndex;
if (config is not StandardKeyboardInputConfig keyboardConfig)
{ {
return;
}
LeftStickUp = keyboardConfig.LeftJoyconStick.StickUp; LeftStickUp = keyboardConfig.LeftJoyconStick.StickUp;
LeftStickDown = keyboardConfig.LeftJoyconStick.StickDown; LeftStickDown = keyboardConfig.LeftJoyconStick.StickDown;
LeftStickLeft = keyboardConfig.LeftJoyconStick.StickLeft; LeftStickLeft = keyboardConfig.LeftJoyconStick.StickLeft;
@ -355,7 +362,6 @@ namespace Ryujinx.Ava.UI.Models.Input
ButtonZr = keyboardConfig.RightJoycon.ButtonZr; ButtonZr = keyboardConfig.RightJoycon.ButtonZr;
} }
} }
}
public InputConfig GetConfig() public InputConfig GetConfig()
{ {