Skip to content
Permalink
Browse files

Removed lastCtrl field

Using already present WindowWithFocus window reference to send SDL touch events to instead.
  • Loading branch information
dominikjancik authored and xen2 committed Aug 30, 2019
1 parent 73dc9ae commit 45d3dd684fe76d12e9cd8d5b53996e46b8188f2e
Showing with 1 addition and 7 deletions.
  1. +1 −7 sources/engine/Xenko.Graphics/SDL/Application.cs
@@ -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>
@@ -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:
@@ -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>

0 comments on commit 45d3dd6

Please sign in to comment.
You can’t perform that action at this time.