diff --git a/JGE/src/SDLmain.cpp b/JGE/src/SDLmain.cpp index fadb0fc31..e7b0ac972 100644 --- a/JGE/src/SDLmain.cpp +++ b/JGE/src/SDLmain.cpp @@ -118,7 +118,7 @@ public: { if (g_engine) { - while(SDL_WaitEventTimeout(&Event, 10)) + for (int x = 0; x < 5 && SDL_WaitEventTimeout(&Event, 10); ++x) { if(!g_engine->IsPaused()) OnEvent(&Event);