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

View file

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

View file

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

View file

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

View file

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