diff options
author | Filippos Karapetis | 2010-05-18 14:57:02 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-18 14:57:02 +0000 |
commit | 6499ddff8e2be705f3be53ab391178ec4c3764f2 (patch) | |
tree | 2f4f5e1a6ba9bdfa34d11c543ca6e92a262ee8cc /engines/saga | |
parent | 11cbdd03180a655b2b23ee4a13f1a00a1d782b3c (diff) | |
download | scummvm-rg350-6499ddff8e2be705f3be53ab391178ec4c3764f2.tar.gz scummvm-rg350-6499ddff8e2be705f3be53ab391178ec4c3764f2.tar.bz2 scummvm-rg350-6499ddff8e2be705f3be53ab391178ec4c3764f2.zip |
Added back video skipping in SAGA2 with the escape key or left mouse button
svn-id: r49080
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/introproc_saga2.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp index 7491815303..785534729e 100644 --- a/engines/saga/introproc_saga2.cpp +++ b/engines/saga/introproc_saga2.cpp @@ -99,8 +99,9 @@ void Scene::playMovie(const char *filename) { uint16 x = (g_system->getWidth() - smkDecoder->getWidth()) / 2; uint16 y = (g_system->getHeight() - smkDecoder->getHeight()) / 2; + bool skipVideo = false; - while (!_vm->shouldQuit() && !smkDecoder->endOfVideo()) { + while (!_vm->shouldQuit() && !smkDecoder->endOfVideo() && !skipVideo) { if (smkDecoder->needsUpdate()) { Graphics::Surface *frame = smkDecoder->decodeNextFrame(); if (frame) { @@ -114,8 +115,10 @@ void Scene::playMovie(const char *filename) { } Common::Event event; - while (_vm->_system->getEventManager()->pollEvent(event)) - ; + while (_vm->_system->getEventManager()->pollEvent(event)) { + if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP) + skipVideo = true; + } _vm->_system->delayMillis(10); } |