Remove redundant property

This commit is contained in:
Isaac Marovitz 2023-09-19 10:52:02 -04:00 committed by Isaac Marovitz
parent a0a74d3d10
commit a6c066ea38
3 changed files with 4 additions and 6 deletions

View file

@ -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));
});
}

View file

@ -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;

View file

@ -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;