Fix stupid mistake

This commit is contained in:
Isaac Marovitz 2023-05-18 17:39:04 -04:00 committed by Isaac Marovitz
parent 355ec4036f
commit a553b090b6
4 changed files with 77 additions and 78 deletions

View file

@ -63,13 +63,13 @@ namespace Ryujinx.Ava.UI.Models.Input
} }
} }
private GamepadInputId _leftControllerStickButton; private GamepadInputId _leftStickButton;
public GamepadInputId LeftControllerStickButton public GamepadInputId LeftStickButton
{ {
get => _leftControllerStickButton; get => _leftStickButton;
set set
{ {
_leftControllerStickButton = value; _leftStickButton = value;
OnPropertyChanged(); OnPropertyChanged();
} }
} }
@ -118,13 +118,13 @@ namespace Ryujinx.Ava.UI.Models.Input
} }
} }
private GamepadInputId _rightControllerStickButton; private GamepadInputId _rightStickButton;
public GamepadInputId RightControllerStickButton public GamepadInputId RightStickButton
{ {
get => _rightControllerStickButton; get => _rightStickButton;
set set
{ {
_rightControllerStickButton = value; _rightStickButton = value;
OnPropertyChanged(); OnPropertyChanged();
} }
} }
@ -479,17 +479,17 @@ namespace Ryujinx.Ava.UI.Models.Input
return; 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;
LeftRotate90 = controllerInput.LeftJoyconStick.Rotate90CW; LeftRotate90 = controllerInput.LeftJoyconStick.Rotate90CW;
LeftControllerStickButton = controllerInput.LeftJoyconStick.StickButton; LeftStickButton = controllerInput.LeftJoyconStick.StickButton;
RightJoystick = controllerInput.RightJoyconStick.Joystick; RightJoystick = controllerInput.RightJoyconStick.Joystick;
RightInvertStickX = controllerInput.RightJoyconStick.InvertStickX; RightInvertStickX = controllerInput.RightJoyconStick.InvertStickX;
RightInvertStickY = controllerInput.RightJoyconStick.InvertStickY; RightInvertStickY = controllerInput.RightJoyconStick.InvertStickY;
RightRotate90 = controllerInput.RightJoyconStick.Rotate90CW; RightRotate90 = controllerInput.RightJoyconStick.Rotate90CW;
RightControllerStickButton = controllerInput.RightJoyconStick.StickButton; RightStickButton = controllerInput.RightJoyconStick.StickButton;
DpadUp = controllerInput.LeftJoycon.DpadUp; DpadUp = controllerInput.LeftJoycon.DpadUp;
DpadDown = controllerInput.LeftJoycon.DpadDown; DpadDown = controllerInput.LeftJoycon.DpadDown;
@ -582,7 +582,7 @@ namespace Ryujinx.Ava.UI.Models.Input
InvertStickX = LeftInvertStickX, InvertStickX = LeftInvertStickX,
InvertStickY = LeftInvertStickY, InvertStickY = LeftInvertStickY,
Rotate90CW = LeftRotate90, Rotate90CW = LeftRotate90,
StickButton = LeftControllerStickButton, StickButton = LeftStickButton,
}, },
RightJoyconStick = new JoyconConfigControllerStick<GamepadInputId, StickInputId> RightJoyconStick = new JoyconConfigControllerStick<GamepadInputId, StickInputId>
{ {
@ -590,7 +590,7 @@ namespace Ryujinx.Ava.UI.Models.Input
InvertStickX = RightInvertStickX, InvertStickX = RightInvertStickX,
InvertStickY = RightInvertStickY, InvertStickY = RightInvertStickY,
Rotate90CW = RightRotate90, Rotate90CW = RightRotate90,
StickButton = RightControllerStickButton, StickButton = RightStickButton,
}, },
Rumble = new RumbleConfigController Rumble = new RumbleConfigController
{ {

View file

@ -54,13 +54,13 @@ namespace Ryujinx.Ava.UI.Models.Input
} }
} }
private Key _leftKeyboardStickButton; private Key _leftStickButton;
public Key LeftKeyboardStickButton public Key LeftStickButton
{ {
get => _leftKeyboardStickButton; get => _leftStickButton;
set set
{ {
_leftKeyboardStickButton = value; _leftStickButton = value;
OnPropertyChanged(); OnPropertyChanged();
} }
} }
@ -109,13 +109,13 @@ namespace Ryujinx.Ava.UI.Models.Input
} }
} }
private Key _rightKeyboardStickButton; private Key _rightStickButton;
public Key RightKeyboardStickButton public Key RightStickButton
{ {
get => _rightKeyboardStickButton; get => _rightStickButton;
set set
{ {
_rightKeyboardStickButton = value; _rightStickButton = value;
OnPropertyChanged(); OnPropertyChanged();
} }
} }
@ -331,15 +331,17 @@ namespace Ryujinx.Ava.UI.Models.Input
return; 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;
LeftStickRight = keyboardConfig.LeftJoyconStick.StickRight; LeftStickRight = keyboardConfig.LeftJoyconStick.StickRight;
LeftStickButton = keyboardConfig.LeftJoyconStick.StickButton;
RightStickUp = keyboardConfig.RightJoyconStick.StickUp; RightStickUp = keyboardConfig.RightJoyconStick.StickUp;
RightStickDown = keyboardConfig.RightJoyconStick.StickDown; RightStickDown = keyboardConfig.RightJoyconStick.StickDown;
RightStickLeft = keyboardConfig.RightJoyconStick.StickLeft; RightStickLeft = keyboardConfig.RightJoyconStick.StickLeft;
RightStickRight = keyboardConfig.RightJoyconStick.StickRight; RightStickRight = keyboardConfig.RightJoyconStick.StickRight;
RightStickButton = keyboardConfig.RightJoyconStick.StickButton;
DpadUp = keyboardConfig.LeftJoycon.DpadUp; DpadUp = keyboardConfig.LeftJoycon.DpadUp;
DpadDown = keyboardConfig.LeftJoycon.DpadDown; DpadDown = keyboardConfig.LeftJoycon.DpadDown;
@ -371,48 +373,45 @@ namespace Ryujinx.Ava.UI.Models.Input
Backend = InputBackendType.WindowKeyboard, Backend = InputBackendType.WindowKeyboard,
PlayerIndex = PlayerIndex, PlayerIndex = PlayerIndex,
ControllerType = ControllerType, ControllerType = ControllerType,
LeftJoycon = LeftJoycon = new LeftJoyconCommonConfig<Key>
new LeftJoyconCommonConfig<Key> {
{ DpadUp = DpadUp,
DpadUp = DpadUp, DpadDown = DpadDown,
DpadDown = DpadDown, DpadLeft = DpadLeft,
DpadLeft = DpadLeft, DpadRight = DpadRight,
DpadRight = DpadRight, ButtonL = ButtonL,
ButtonL = ButtonL, ButtonMinus = ButtonMinus,
ButtonMinus = ButtonMinus, ButtonZl = ButtonZl,
ButtonZl = ButtonZl, ButtonSl = LeftButtonSl,
ButtonSl = LeftButtonSl, ButtonSr = LeftButtonSr,
ButtonSr = LeftButtonSr, },
}, RightJoycon = new RightJoyconCommonConfig<Key>
RightJoycon = {
new RightJoyconCommonConfig<Key> ButtonA = ButtonA,
{ ButtonB = ButtonB,
ButtonA = ButtonA, ButtonX = ButtonX,
ButtonB = ButtonB, ButtonY = ButtonY,
ButtonX = ButtonX, ButtonPlus = ButtonPlus,
ButtonY = ButtonY, ButtonSl = RightButtonSl,
ButtonPlus = ButtonPlus, ButtonSr = RightButtonSr,
ButtonSl = RightButtonSl, ButtonR = ButtonR,
ButtonSr = RightButtonSr, ButtonZr = ButtonZr
ButtonR = ButtonR, },
ButtonZr = ButtonZr LeftJoyconStick = new JoyconConfigKeyboardStick<Key>
}, {
LeftJoyconStick = StickUp = LeftStickUp,
new JoyconConfigKeyboardStick<Key> StickDown = LeftStickDown,
{ StickRight = LeftStickRight,
StickUp = LeftStickUp, StickLeft = LeftStickLeft,
StickDown = LeftStickDown, StickButton = LeftStickButton
StickRight = LeftStickRight, },
StickLeft = LeftStickLeft,
StickButton = LeftKeyboardStickButton
},
RightJoyconStick = new JoyconConfigKeyboardStick<Key> RightJoyconStick = new JoyconConfigKeyboardStick<Key>
{ {
StickUp = RightStickUp, StickUp = RightStickUp,
StickDown = RightStickDown, StickDown = RightStickDown,
StickLeft = RightStickLeft, StickLeft = RightStickLeft,
StickRight = RightStickRight, StickRight = RightStickRight,
StickButton = RightKeyboardStickButton StickButton = RightStickButton
}, },
Version = InputConfig.CurrentVersion Version = InputConfig.CurrentVersion
}; };

View file

@ -142,7 +142,7 @@
TextAlignment="Center" /> TextAlignment="Center" />
<ToggleButton> <ToggleButton>
<TextBlock <TextBlock
Text="{Binding Config.LeftControllerStickButton, Mode=TwoWay, Converter={StaticResource Key}}" Text="{Binding Config.LeftStickButton, Mode=TwoWay, Converter={StaticResource Key}}"
TextAlignment="Center" /> TextAlignment="Center" />
</ToggleButton> </ToggleButton>
</StackPanel> </StackPanel>
@ -560,7 +560,7 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
</Border> </Border>
<!-- Right Joystick --> <!-- Right Buttons -->
<Border <Border
BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1" BorderThickness="1"
@ -674,7 +674,7 @@
TextAlignment="Center" /> TextAlignment="Center" />
<ToggleButton> <ToggleButton>
<TextBlock <TextBlock
Text="{Binding Config.RightControllerStickButton, Mode=TwoWay, Converter={StaticResource Key}}" Text="{Binding Config.RightStickButton, Mode=TwoWay, Converter={StaticResource Key}}"
TextAlignment="Center" /> TextAlignment="Center" />
</ToggleButton> </ToggleButton>
</StackPanel> </StackPanel>

View file

@ -143,7 +143,7 @@
TextAlignment="Center" /> TextAlignment="Center" />
<ToggleButton> <ToggleButton>
<TextBlock <TextBlock
Text="{Binding Config.LeftKeyboardStickButton, Mode=TwoWay, Converter={StaticResource Key}}" Text="{Binding Config.LeftStickButton, Mode=TwoWay, Converter={StaticResource Key}}"
TextAlignment="Center" /> TextAlignment="Center" />
</ToggleButton> </ToggleButton>
</StackPanel> </StackPanel>
@ -481,7 +481,7 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
</Border> </Border>
<!-- Right Joystick --> <!-- Right Buttons -->
<Border <Border
BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1" BorderThickness="1"
@ -596,7 +596,7 @@
TextAlignment="Center" /> TextAlignment="Center" />
<ToggleButton> <ToggleButton>
<TextBlock <TextBlock
Text="{Binding Config.RightKeyboardStickButton, Mode=TwoWay, Converter={StaticResource Key}}" Text="{Binding Config.RightStickButton, Mode=TwoWay, Converter={StaticResource Key}}"
TextAlignment="Center" /> TextAlignment="Center" />
</ToggleButton> </ToggleButton>
</StackPanel> </StackPanel>