diff options
author | Filippos Karapetis | 2009-10-16 07:42:23 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-16 07:42:23 +0000 |
commit | 422b732dbadde0b23aaec05b39edec9e1c81f91e (patch) | |
tree | 80ce8d6063e6e60cd4e273210ac5bf9d66e56136 /graphics/video/video_player.cpp | |
parent | 9934b70733f3322e1136d805f927fb0f628d1dfc (diff) | |
download | scummvm-rg350-422b732dbadde0b23aaec05b39edec9e1c81f91e.tar.gz scummvm-rg350-422b732dbadde0b23aaec05b39edec9e1c81f91e.tar.bz2 scummvm-rg350-422b732dbadde0b23aaec05b39edec9e1c81f91e.zip |
Added a new convenience method to the video player, which adds the event of skipping videos with the escape key by default, thereby simplifying the video playing code in all places where it's used
svn-id: r45151
Diffstat (limited to 'graphics/video/video_player.cpp')
-rw-r--r-- | graphics/video/video_player.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/video/video_player.cpp b/graphics/video/video_player.cpp index 81c025d22f..a8c4ccba89 100644 --- a/graphics/video/video_player.cpp +++ b/graphics/video/video_player.cpp @@ -225,6 +225,17 @@ bool VideoPlayer::playVideo(Common::List<Common::Event> &stopEvents) { return !_skipVideo; } +bool VideoPlayer::playVideo() { + Common::Event stopEvent; + Common::List<Common::Event> stopEvents; + stopEvents.clear(); + stopEvent.type = Common::EVENT_KEYDOWN; + stopEvent.kbd = Common::KEYCODE_ESCAPE; + stopEvents.push_back(stopEvent); + + return playVideo(stopEvents); +} + void VideoPlayer::performPostProcessing(byte *screen) { } |