Apply suggestions from code review

Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
Isaac Marovitz 2024-03-17 09:08:34 -04:00 committed by Isaac Marovitz
commit 4ca6acdd4a
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
5 changed files with 16 additions and 15 deletions

View file

@ -504,7 +504,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ButtonMinus = ButtonMinus, ButtonMinus = ButtonMinus,
ButtonSl = LeftButtonSl, ButtonSl = LeftButtonSl,
ButtonSr = LeftButtonSr, ButtonSr = LeftButtonSr,
ButtonZl = ButtonZl ButtonZl = ButtonZl,
}, },
RightJoycon = new RightJoyconCommonConfig<GamepadInputId> RightJoycon = new RightJoyconCommonConfig<GamepadInputId>
{ {
@ -516,7 +516,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ButtonSl = RightButtonSl, ButtonSl = RightButtonSl,
ButtonSr = RightButtonSr, ButtonSr = RightButtonSr,
ButtonR = ButtonR, ButtonR = ButtonR,
ButtonZr = ButtonZr ButtonZr = ButtonZr,
}, },
LeftJoyconStick = new JoyconConfigControllerStick<GamepadInputId, StickInputId> LeftJoyconStick = new JoyconConfigControllerStick<GamepadInputId, StickInputId>
{ {
@ -524,7 +524,7 @@ namespace Ryujinx.Ava.UI.Models.Input
InvertStickX = LeftInvertStickX, InvertStickX = LeftInvertStickX,
InvertStickY = LeftInvertStickY, InvertStickY = LeftInvertStickY,
Rotate90CW = LeftRotate90, Rotate90CW = LeftRotate90,
StickButton = LeftStickButton StickButton = LeftStickButton,
}, },
RightJoyconStick = new JoyconConfigControllerStick<GamepadInputId, StickInputId> RightJoyconStick = new JoyconConfigControllerStick<GamepadInputId, StickInputId>
{ {
@ -532,20 +532,20 @@ namespace Ryujinx.Ava.UI.Models.Input
InvertStickX = RightInvertStickX, InvertStickX = RightInvertStickX,
InvertStickY = RightInvertStickY, InvertStickY = RightInvertStickY,
Rotate90CW = RightRotate90, Rotate90CW = RightRotate90,
StickButton = RightStickButton StickButton = RightStickButton,
}, },
Rumble = new RumbleConfigController Rumble = new RumbleConfigController
{ {
EnableRumble = EnableRumble, EnableRumble = EnableRumble,
WeakRumble = WeakRumble, WeakRumble = WeakRumble,
StrongRumble = StrongRumble StrongRumble = StrongRumble,
}, },
Version = InputConfig.CurrentVersion, Version = InputConfig.CurrentVersion,
DeadzoneLeft = DeadzoneLeft, DeadzoneLeft = DeadzoneLeft,
DeadzoneRight = DeadzoneRight, DeadzoneRight = DeadzoneRight,
RangeLeft = RangeLeft, RangeLeft = RangeLeft,
RangeRight = RangeRight, RangeRight = RangeRight,
TriggerThreshold = TriggerThreshold TriggerThreshold = TriggerThreshold,
}; };
if (EnableCemuHookMotion) if (EnableCemuHookMotion)
@ -560,7 +560,7 @@ namespace Ryujinx.Ava.UI.Models.Input
DsuServerPort = DsuServerPort, DsuServerPort = DsuServerPort,
Slot = Slot, Slot = Slot,
AltSlot = AltSlot, AltSlot = AltSlot,
MirrorInput = MirrorInput MirrorInput = MirrorInput,
}; };
} }
else else
@ -570,7 +570,7 @@ namespace Ryujinx.Ava.UI.Models.Input
EnableMotion = EnableMotion, EnableMotion = EnableMotion,
MotionBackend = MotionInputBackendType.GamepadDriver, MotionBackend = MotionInputBackendType.GamepadDriver,
GyroDeadzone = GyroDeadzone, GyroDeadzone = GyroDeadzone,
Sensitivity = Sensitivity Sensitivity = Sensitivity,
}; };
} }

View file

@ -132,7 +132,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ResScaleUp = ResScaleUp, ResScaleUp = ResScaleUp,
ResScaleDown = ResScaleDown, ResScaleDown = ResScaleDown,
VolumeUp = VolumeUp, VolumeUp = VolumeUp,
VolumeDown = VolumeDown VolumeDown = VolumeDown,
}; };
return config; return config;

View file

@ -383,7 +383,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ButtonMinus = ButtonMinus, ButtonMinus = ButtonMinus,
ButtonZl = ButtonZl, ButtonZl = ButtonZl,
ButtonSl = LeftButtonSl, ButtonSl = LeftButtonSl,
ButtonSr = LeftButtonSr ButtonSr = LeftButtonSr,
}, },
RightJoycon = new RightJoyconCommonConfig<Key> RightJoycon = new RightJoyconCommonConfig<Key>
{ {
@ -395,7 +395,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ButtonSl = RightButtonSl, ButtonSl = RightButtonSl,
ButtonSr = RightButtonSr, ButtonSr = RightButtonSr,
ButtonR = ButtonR, ButtonR = ButtonR,
ButtonZr = ButtonZr ButtonZr = ButtonZr,
}, },
LeftJoyconStick = new JoyconConfigKeyboardStick<Key> LeftJoyconStick = new JoyconConfigKeyboardStick<Key>
{ {
@ -403,7 +403,7 @@ namespace Ryujinx.Ava.UI.Models.Input
StickDown = LeftStickDown, StickDown = LeftStickDown,
StickRight = LeftStickRight, StickRight = LeftStickRight,
StickLeft = LeftStickLeft, StickLeft = LeftStickLeft,
StickButton = LeftStickButton StickButton = LeftStickButton,
}, },
RightJoyconStick = new JoyconConfigKeyboardStick<Key> RightJoyconStick = new JoyconConfigKeyboardStick<Key>
{ {
@ -411,9 +411,9 @@ namespace Ryujinx.Ava.UI.Models.Input
StickDown = RightStickDown, StickDown = RightStickDown,
StickLeft = RightStickLeft, StickLeft = RightStickLeft,
StickRight = RightStickRight, StickRight = RightStickRight,
StickButton = RightStickButton StickButton = RightStickButton,
}, },
Version = InputConfig.CurrentVersion Version = InputConfig.CurrentVersion,
}; };
return config; return config;

View file

@ -54,7 +54,7 @@ namespace Ryujinx.Ava.UI.Views.Input
{ {
_currentAssigner = new ButtonKeyAssigner(button); _currentAssigner = new ButtonKeyAssigner(button);
this.Focus(NavigationMethod.Pointer); Focus(NavigationMethod.Pointer);
PointerPressed += MouseClick; PointerPressed += MouseClick;

View file

@ -28,6 +28,7 @@ namespace Ryujinx.Ava.UI.Views.Settings
button.IsCheckedChanged += Button_IsCheckedChanged; button.IsCheckedChanged += Button_IsCheckedChanged;
} }
} }
_avaloniaKeyboardDriver = new AvaloniaKeyboardDriver(this); _avaloniaKeyboardDriver = new AvaloniaKeyboardDriver(this);
} }