From 40734a8d6c90d02655f6c5b32471eef5c1e44af9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 15:01:10 +0000 Subject: Made test render function a bit more responsive for backend events. svn-id: r32180 --- graphics/VectorRenderer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'graphics') diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp index d626c2aa51..9a10428b64 100644 --- a/graphics/VectorRenderer.cpp +++ b/graphics/VectorRenderer.cpp @@ -60,7 +60,8 @@ void vector_renderer_test(OSystem *_system) { _system->showOverlay(); - while (true) { // draw!! + bool running = true; + while (running) { // draw!! vr->setFgColor(255, 0, 206); vr->setGradientFactor(1); vr->setGradientColors(214, 113, 8, 240, 200, 25); @@ -87,8 +88,9 @@ void vector_renderer_test(OSystem *_system) { Common::Event event; _system->delayMillis(100); - if (eventMan->pollEvent(event) && event.type == Common::EVENT_QUIT) { - break; + while (eventMan->pollEvent(event)) { + if (event.type == Common::EVENT_QUIT) + running = false; } } -- cgit v1.2.3