Skip to content

Commit

Permalink
SDL test
Browse files Browse the repository at this point in the history
  • Loading branch information
PunkPun committed Mar 25, 2023
1 parent 7960dac commit 6942d5c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion OpenRA.Platforms.Default/Sdl2Input.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,20 @@ public void PumpInput(Sdl2PlatformWindow device, IInputHandler inputHandler, int
inputHandler.ModifierKeys(mods);
MouseInput? pendingMotion = null;

while (SDL.SDL_PollEvent(out var e) != 0)
var skip = true;
while (true)
{
if (SDL.SDL_PollEvent(out var e) == 0)
{
if (skip)
{
skip = false;
continue;
}

break;
}

switch (e.type)
{
case SDL.SDL_EventType.SDL_QUIT:
Expand Down

0 comments on commit 6942d5c

Please # to comment.