mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-03 06:11:00 +00:00
Use new axis querying functions to update mouse scroll state.
This commit is contained in:
parent
72f1e433b4
commit
a7ca0921df
|
@ -485,21 +485,15 @@ namespace OpenTK.Platform.Linux
|
||||||
{
|
{
|
||||||
mouse.State.SetIsConnected(true);
|
mouse.State.SetIsConnected(true);
|
||||||
|
|
||||||
double value = e.AxisValue;
|
if (e.HasAxis(PointerAxis.HorizontalScroll))
|
||||||
PointerAxis axis = e.Axis;
|
|
||||||
switch (axis)
|
|
||||||
{
|
{
|
||||||
case PointerAxis.HorizontalScroll:
|
|
||||||
mouse.State.SetScrollRelative((float)value, 0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PointerAxis.VerticalScroll:
|
mouse.State.SetScrollRelative((float)e.AxisValue(PointerAxis.HorizontalScroll), 0);
|
||||||
mouse.State.SetScrollRelative(0, (float)value);
|
}
|
||||||
break;
|
if (e.HasAxis(PointerAxis.VerticalScroll))
|
||||||
|
{
|
||||||
default:
|
Debug.Print(e.AxisValue(PointerAxis.VerticalScroll));
|
||||||
Debug.Print("[Input] Unknown scroll axis {0}.", axis);
|
mouse.State.SetScrollRelative(0, (float)e.AxisValue(PointerAxis.VerticalScroll));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue