mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 12:49:13 +00:00
Ack Suggestions
Remaining ack suggestions Update src/Ryujinx.Ava/UI/Models/Input/ControllerInputConfig.cs Co-authored-by: Ac_K <Acoustik666@gmail.com> Update src/Ryujinx.Ava/UI/Models/Input/ControllerInputConfig.cs Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
parent
71fa81017b
commit
5e8eedae37
6 changed files with 72 additions and 77 deletions
|
@ -275,8 +275,8 @@
|
||||||
"KeyAltRight": "Alt Right",
|
"KeyAltRight": "Alt Right",
|
||||||
"KeyOptLeft": "⌥ Left",
|
"KeyOptLeft": "⌥ Left",
|
||||||
"KeyOptRight": "⌥ Right",
|
"KeyOptRight": "⌥ Right",
|
||||||
"KeyWinLeft": "Windows Left",
|
"KeyWinLeft": "⊞ Left",
|
||||||
"KeyWinRight": "Windows Right",
|
"KeyWinRight": "⊞ Right",
|
||||||
"KeyCmdLeft": "⌘ Left",
|
"KeyCmdLeft": "⌘ Left",
|
||||||
"KeyCmdRight": "⌘ Right",
|
"KeyCmdRight": "⌘ Right",
|
||||||
"KeyMenu": "Menu",
|
"KeyMenu": "Menu",
|
||||||
|
|
|
@ -339,7 +339,6 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_deadzoneLeft = MathF.Round(value, 3);
|
_deadzoneLeft = MathF.Round(value, 3);
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -351,7 +350,6 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_deadzoneRight = MathF.Round(value, 3);
|
_deadzoneRight = MathF.Round(value, 3);
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -363,7 +361,6 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_rangeLeft = MathF.Round(value, 3);
|
_rangeLeft = MathF.Round(value, 3);
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -375,7 +372,6 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_rangeRight = MathF.Round(value, 3);
|
_rangeRight = MathF.Round(value, 3);
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -387,7 +383,6 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_triggerThreshold = MathF.Round(value, 3);
|
_triggerThreshold = MathF.Round(value, 3);
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -521,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>
|
||||||
{
|
{
|
||||||
|
@ -529,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>
|
||||||
{
|
{
|
||||||
|
@ -537,7 +532,7 @@ 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
|
||||||
{
|
{
|
||||||
|
@ -550,7 +545,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||||
DeadzoneRight = DeadzoneRight,
|
DeadzoneRight = DeadzoneRight,
|
||||||
RangeLeft = RangeLeft,
|
RangeLeft = RangeLeft,
|
||||||
RangeRight = RangeRight,
|
RangeRight = RangeRight,
|
||||||
TriggerThreshold = TriggerThreshold,
|
TriggerThreshold = TriggerThreshold
|
||||||
};
|
};
|
||||||
|
|
||||||
if (EnableCemuHookMotion)
|
if (EnableCemuHookMotion)
|
||||||
|
|
|
@ -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>
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,6 +56,14 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
|
|
||||||
public InputViewModel parentModel;
|
public InputViewModel parentModel;
|
||||||
|
|
||||||
|
public ControllerInputViewModel(InputViewModel model, ControllerInputConfig config)
|
||||||
|
{
|
||||||
|
parentModel = model;
|
||||||
|
model.NotifyChangesEvent += OnParentModelChanged;
|
||||||
|
OnParentModelChanged();
|
||||||
|
Config = config;
|
||||||
|
}
|
||||||
|
|
||||||
public async void ShowMotionConfig()
|
public async void ShowMotionConfig()
|
||||||
{
|
{
|
||||||
await MotionInputView.Show(this);
|
await MotionInputView.Show(this);
|
||||||
|
@ -66,15 +74,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
await RumbleInputView.Show(this);
|
await RumbleInputView.Show(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ControllerInputViewModel(InputViewModel model, ControllerInputConfig config)
|
public void OnParentModelChanged()
|
||||||
{
|
|
||||||
parentModel = model;
|
|
||||||
model.NotifyChangesEvent += UpdateParentModelValues;
|
|
||||||
UpdateParentModelValues();
|
|
||||||
Config = config;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateParentModelValues()
|
|
||||||
{
|
{
|
||||||
IsLeft = parentModel.IsLeft;
|
IsLeft = parentModel.IsLeft;
|
||||||
IsRight = parentModel.IsRight;
|
IsRight = parentModel.IsRight;
|
||||||
|
|
|
@ -58,12 +58,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
public KeyboardInputViewModel(InputViewModel model, KeyboardInputConfig config)
|
public KeyboardInputViewModel(InputViewModel model, KeyboardInputConfig config)
|
||||||
{
|
{
|
||||||
parentModel = model;
|
parentModel = model;
|
||||||
model.NotifyChangesEvent += UpdateParentModelValues;
|
model.NotifyChangesEvent += OnParentModelChanged;
|
||||||
UpdateParentModelValues();
|
OnParentModelChanged();
|
||||||
Config = config;
|
Config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateParentModelValues()
|
public void OnParentModelChanged()
|
||||||
{
|
{
|
||||||
IsLeft = parentModel.IsLeft;
|
IsLeft = parentModel.IsLeft;
|
||||||
IsRight = parentModel.IsRight;
|
IsRight = parentModel.IsRight;
|
||||||
|
|
|
@ -893,7 +893,7 @@ namespace Ryujinx.UI.Windows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object pressedButton = assigner.GetPressedButton();
|
string pressedButton = assigner.GetPressedButton().ToString();
|
||||||
|
|
||||||
Application.Invoke(delegate
|
Application.Invoke(delegate
|
||||||
{
|
{
|
||||||
|
@ -903,7 +903,7 @@ namespace Ryujinx.UI.Windows
|
||||||
}
|
}
|
||||||
else if (pressedButton != "")
|
else if (pressedButton != "")
|
||||||
{
|
{
|
||||||
button.Label = pressedButton.ToString();
|
button.Label = pressedButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
_middleMousePressed = false;
|
_middleMousePressed = false;
|
||||||
|
|
Loading…
Reference in a new issue