diff options
author | Max Horn | 2008-05-06 09:54:10 +0000 |
---|---|---|
committer | Max Horn | 2008-05-06 09:54:10 +0000 |
commit | 4331411ebea61072ff0189d7d61ac57199a120af (patch) | |
tree | f330458ef32d81d4a27b975bdd42f7bb9007db90 | |
parent | 7c55a889f2176efaae6f8602f04328de1ca4e8ba (diff) | |
download | scummvm-rg350-4331411ebea61072ff0189d7d61ac57199a120af.tar.gz scummvm-rg350-4331411ebea61072ff0189d7d61ac57199a120af.tar.bz2 scummvm-rg350-4331411ebea61072ff0189d7d61ac57199a120af.zip |
Make it possible to quit the VectorRenderer demo cleanly
svn-id: r31892
-rw-r--r-- | graphics/VectorRenderer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp index 0da5d7568d..4a88eb94b4 100644 --- a/graphics/VectorRenderer.cpp +++ b/graphics/VectorRenderer.cpp @@ -28,6 +28,7 @@ #include "graphics/VectorRenderer.h" #include "graphics/colormasks.h" #include "common/system.h" +#include "common/events.h" namespace Graphics { @@ -39,6 +40,8 @@ VectorRenderer *createRenderer() { void vector_renderer_test(OSystem *_system) { + Common::EventManager *eventMan = _system->getEventManager(); + VectorRenderer *vr = createRenderer(); Surface _screen; @@ -66,7 +69,12 @@ void vector_renderer_test(OSystem *_system) { vr->drawSquare(150, 25, 100, 100, true); _system->copyRectToOverlay((OverlayColor*)_screen.getBasePtr(0, 0), _screen.w, 0, 0, _screen.w, _screen.w); _system->updateScreen(); + + Common::Event event; _system->delayMillis(100); + if (eventMan->pollEvent(event) && event.type == Common::EVENT_QUIT) { + break; + } } _system->hideOverlay(); |