From a6c066ea38c0f5ae45afb7aa4da8275137216fce Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Tue, 19 Sep 2023 10:52:02 -0400 Subject: [PATCH] Remove redundant property --- src/Ryujinx.Ava/UI/Helpers/ButtonKeyAssigner.cs | 6 ++---- src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml.cs | 2 +- src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Ryujinx.Ava/UI/Helpers/ButtonKeyAssigner.cs b/src/Ryujinx.Ava/UI/Helpers/ButtonKeyAssigner.cs index db450a9ff..54e0918a5 100644 --- a/src/Ryujinx.Ava/UI/Helpers/ButtonKeyAssigner.cs +++ b/src/Ryujinx.Ava/UI/Helpers/ButtonKeyAssigner.cs @@ -12,13 +12,11 @@ namespace Ryujinx.Ava.UI.Helpers internal class ButtonAssignedEventArgs : EventArgs { public ToggleButton Button { get; } - public bool IsAssigned { get; } public ButtonValue? ButtonValue { get; } - public ButtonAssignedEventArgs(ToggleButton button, bool isAssigned, ButtonValue? buttonValue) + public ButtonAssignedEventArgs(ToggleButton button, ButtonValue? buttonValue) { Button = button; - IsAssigned = isAssigned; ButtonValue = buttonValue; } } @@ -89,7 +87,7 @@ namespace Ryujinx.Ava.UI.Helpers ToggledButton.IsChecked = false; - ButtonAssigned?.Invoke(this, new ButtonAssignedEventArgs(ToggledButton, pressedButton.HasValue, pressedButton)); + ButtonAssigned?.Invoke(this, new ButtonAssignedEventArgs(ToggledButton, pressedButton)); }); } diff --git a/src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml.cs b/src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml.cs index 240a930e8..52fc62389 100644 --- a/src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml.cs +++ b/src/Ryujinx.Ava/UI/Views/Input/ControllerInputView.axaml.cs @@ -65,7 +65,7 @@ namespace Ryujinx.Ava.UI.Views.Input _currentAssigner.ButtonAssigned += (sender, e) => { - if (e.IsAssigned) + if (e.ButtonValue.HasValue) { var viewModel = (DataContext as ControllerInputViewModel); var buttonValue = e.ButtonValue.Value; diff --git a/src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs b/src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs index 59da29156..f7024c5d1 100644 --- a/src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs +++ b/src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs @@ -64,7 +64,7 @@ namespace Ryujinx.Ava.UI.Views.Input _currentAssigner.ButtonAssigned += (sender, e) => { - if (e.IsAssigned) + if (e.ButtonValue.HasValue) { var viewModel = (DataContext as KeyboardInputViewModel); var buttonValue = e.ButtonValue.Value;