diff options
author | richiesams | 2013-07-16 16:59:11 -0500 |
---|---|---|
committer | richiesams | 2013-08-04 13:32:21 -0500 |
commit | 071d9f2241d608753372a027b489ae3027d73480 (patch) | |
tree | ba6f96a7ba33388a3eb49578da1814a2523462bc | |
parent | 92f3de72de273cc4ae3767e5991ff1f7cd85c8ed (diff) | |
download | scummvm-rg350-071d9f2241d608753372a027b489ae3027d73480.tar.gz scummvm-rg350-071d9f2241d608753372a027b489ae3027d73480.tar.bz2 scummvm-rg350-071d9f2241d608753372a027b489ae3027d73480.zip |
ZVISION: Add logic to allow the user to break out of videos
-rw-r--r-- | engines/zvision/events.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/zvision/events.cpp b/engines/zvision/events.cpp index 984d59e2ba..a3d6b6b670 100644 --- a/engines/zvision/events.cpp +++ b/engines/zvision/events.cpp @@ -25,6 +25,7 @@ #include "zvision/zvision.h" #include "zvision/console.h" #include "common/events.h" +#include "engines/util.h" namespace ZVision { @@ -55,12 +56,19 @@ void ZVision::processEvents() { _console->onFrame(); } break; - case Common::KEYCODE_q: if (_event.kbd.hasFlags(Common::KBD_CTRL)) quitGame(); break; - + case Common::KEYCODE_ESCAPE: + if (_currentVideo != 0) { + initGraphics(_width, _height, true, &_pixelFormat); + delete _currentVideo; + _currentVideo = 0; + delete _scaledVideoFrameBuffer; + _scaledVideoFrameBuffer = 0; + } + break; default: break; } |