mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 12:49:13 +00:00
Remove redundant property
This commit is contained in:
parent
a0a74d3d10
commit
a6c066ea38
3 changed files with 4 additions and 6 deletions
|
@ -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));
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue