Browse Source

Fixed compilation with old compiler versions

pull/4166/head
Nikita Tsukanov 6 years ago
committed by GitHub
parent
commit
6149cd69b5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/Avalonia.X11/XI2Manager.cs

4
src/Avalonia.X11/XI2Manager.cs

@ -239,13 +239,13 @@ namespace Avalonia.X11
if (ev.Type == XiEventType.XI_ButtonPress && ev.Button >= 4 && ev.Button <= 7 && !ev.Emulated)
{
Vector? scrollDelta = ev.Button switch
var scrollDelta = ev.Button switch
{
4 => new Vector(0, 1),
5 => new Vector(0, -1),
6 => new Vector(1, 0),
7 => new Vector(-1, 0),
_ => null
_ => (Vector?)null
};
if (scrollDelta.HasValue)

Loading…
Cancel
Save