Ava: Fix wrong MouseButton ()

This commit is contained in:
Ac_K 2023-05-12 21:39:42 +02:00 committed by GitHub
parent 7271f1b18e
commit 2b6e81deea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,13 +70,16 @@ namespace Ryujinx.Ava.Input
private void Parent_PointerReleaseEvent(object o, PointerReleasedEventArgs args)
{
int button = (int)args.InitialPressMouseButton - 1;
if (args.InitialPressMouseButton != Avalonia.Input.MouseButton.None)
{
int button = (int)args.InitialPressMouseButton;
if (PressedButtons.Count() >= button)
{
PressedButtons[button] = false;
}
}
}
private void Parent_PointerPressEvent(object o, PointerPressedEventArgs args)
{