Skip to content

Commit

Permalink
Removed lastCtrl field
Browse files Browse the repository at this point in the history
Using already present WindowWithFocus window reference to send SDL touch events to instead.
  • Loading branch information
domjancik committed Aug 30, 2019
1 parent d1b92ec commit 2fe7562
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions sources/engine/Xenko.Graphics/SDL/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ public static void ProcessEvents()
}
}

// Used for FINGER* events that do not provide their own windowID
static Window lastCtrl = null;

/// <summary>
/// Process a single event and dispatch it to the right window.
/// </summary>
Expand Down Expand Up @@ -166,7 +163,7 @@ public static void ProcessEvent(SDL.SDL_Event e)
case SDL.SDL_EventType.SDL_FINGERMOTION:
case SDL.SDL_EventType.SDL_FINGERDOWN:
case SDL.SDL_EventType.SDL_FINGERUP:
ctrl = lastCtrl;
ctrl = WindowWithFocus;
break;

case SDL.SDL_EventType.SDL_WINDOWEVENT:
Expand All @@ -191,9 +188,6 @@ public static void ProcessEvent(SDL.SDL_Event e)
break;
}
ctrl?.ProcessEvent(e);

// TODO this is a bit of a mess but FINGER* events do not provide a proper windowID - how to handle?
if (ctrl != null) lastCtrl = ctrl;
}

/// <summary>
Expand Down

0 comments on commit 2fe7562

Please sign in to comment.