Input: AvaloniaMouseDriver: fix native touch inputs (ryubing/ryujinx!178)
See merge request ryubing/ryujinx!178
This commit is contained in:
parent
8714b010f6
commit
0c6d4a07b9
1 changed files with 9 additions and 3 deletions
|
|
@ -104,12 +104,18 @@ namespace Ryujinx.Ava.Input
|
|||
}
|
||||
private void Parent_PointerPressedEvent(object o, PointerPressedEventArgs args)
|
||||
{
|
||||
uint button = (uint)args.GetCurrentPoint(_widget).Properties.PointerUpdateKind;
|
||||
PointerPoint currentPoint = args.GetCurrentPoint(_widget);
|
||||
uint button = (uint)currentPoint.Properties.PointerUpdateKind;
|
||||
|
||||
if ((uint)PressedButtons.Length > button)
|
||||
{
|
||||
PressedButtons[button] = true;
|
||||
}
|
||||
|
||||
if (args.Pointer.Type == PointerType.Touch) // mouse position is unchanged for touch events, set touch position
|
||||
{
|
||||
CurrentPosition = new Vector2((float)currentPoint.Position.X, (float)currentPoint.Position.Y);
|
||||
}
|
||||
}
|
||||
|
||||
private void Parent_PointerMovedEvent(object o, PointerEventArgs args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue