From 33ad4b0cffd32bad53534a68a02514b9559b06a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 22 Apr 2013 17:42:10 +0200 Subject: [PATCH] Platform::Sdl2Application: just wait for next event. No need to loop over when SDL has function designed to do this. --- src/Platform/Sdl2Application.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Platform/Sdl2Application.cpp b/src/Platform/Sdl2Application.cpp index e57d1bb42..57f872ac8 100644 --- a/src/Platform/Sdl2Application.cpp +++ b/src/Platform/Sdl2Application.cpp @@ -24,8 +24,6 @@ #include "Sdl2Application.h" -#include - #include "Context.h" #include "ExtensionWrangler.h" @@ -178,7 +176,7 @@ void Sdl2Application::mainLoop() { if(flags & Flag::Redraw) { flags &= ~Flag::Redraw; drawEvent(); - } else Corrade::Utility::sleep(5); + } else SDL_WaitEvent(nullptr); } void Sdl2Application::setMouseLocked(bool enabled) {