mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 10:35:38 +00:00
[X11] Fixed core X11 scrolling and absolute y motions
This commit is contained in:
parent
9ae778a00f
commit
ffa3df29eb
|
@ -490,6 +490,8 @@ namespace OpenTK.Platform.X11
|
|||
float dx, dy;
|
||||
MouseButton button = X11KeyMap.TranslateButton(raw.detail, out dx, out dy);
|
||||
mouse.State[button] = raw.evtype == XIEventType.RawButtonPress;
|
||||
if (mouse.ScrollX.number == -1 && mouse.ScrollY.number == -1)
|
||||
mouse.State.SetScrollRelative(dx, dy);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -554,7 +556,7 @@ namespace OpenTK.Platform.X11
|
|||
d.State.X += (int)Math.Round(x);
|
||||
else
|
||||
d.State.X = (int)Math.Round(x);
|
||||
if (d.MotionY.mode == XIMode.Absolute)
|
||||
if (d.MotionY.mode == XIMode.Relative)
|
||||
d.State.Y += (int)Math.Round(y);
|
||||
else
|
||||
d.State.Y = (int)Math.Round(y);
|
||||
|
|
Loading…
Reference in a new issue