aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2011-01-20 15:29:32 +0000
committerSven Hesse2011-01-20 15:29:32 +0000
commitadf8820aee35ce2fa38b5420aab50461653f705f (patch)
tree4e8876a9324b20443a00fedb7442efa65b17c2b3
parent862596bbd4a5158a32ef07aff19e52f42ba03e83 (diff)
downloadscummvm-rg350-adf8820aee35ce2fa38b5420aab50461653f705f.tar.gz
scummvm-rg350-adf8820aee35ce2fa38b5420aab50461653f705f.tar.bz2
scummvm-rg350-adf8820aee35ce2fa38b5420aab50461653f705f.zip
GOB: Make blocking videos default
svn-id: r55354
-rw-r--r--engines/gob/inter_v6.cpp7
-rw-r--r--engines/gob/videoplayer.cpp10
-rw-r--r--engines/gob/videoplayer.h2
3 files changed, 11 insertions, 8 deletions
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index c04f34d894..5f93f9af26 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -169,7 +169,7 @@ void Inter_v6::o6_playVmdOrMusic() {
close = false;
}
- _vm->_vidPlayer->evaluateFlags(props);
+ _vm->_vidPlayer->evaluateFlags(props, true);
int slot = 0;
if ((fileName[0] != 0) && ((slot = _vm->_vidPlayer->openVideo(true, fileName, props)) < 0)) {
@@ -177,11 +177,6 @@ void Inter_v6::o6_playVmdOrMusic() {
return;
}
- if(!(props.flags & 0x1000) && !(props.flags & VideoPlayer::kFlagNoVideo))
- props.flags |= VideoPlayer::kFlagNonBlocking;
- else
- props.flags &= ~0x1000;
-
if (props.startFrame >= 0)
_vm->_vidPlayer->play(slot, props);
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index c9dae63fa5..2c779b512d 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -74,7 +74,7 @@ VideoPlayer::~VideoPlayer() {
_videoSlots[i].close();
}
-void VideoPlayer::evaluateFlags(Properties &properties) {
+void VideoPlayer::evaluateFlags(Properties &properties, bool allowNonBlock) {
if (properties.flags & kFlagFrontSurface) {
properties.sprite = Draw::kFrontSurface;
} else if (properties.flags & kFlagOtherSurface) {
@@ -87,6 +87,14 @@ void VideoPlayer::evaluateFlags(Properties &properties) {
} else {
properties.sprite = Draw::kBackSurface;
}
+
+ if (allowNonBlock) {
+ if(!(properties.flags & 0x1000) && !(properties.flags & kFlagNoVideo))
+ properties.flags |= kFlagNonBlocking;
+ else
+ properties.flags &= ~0x1000;
+ } else
+ properties.flags &= ~0x1000;
}
int VideoPlayer::openVideo(bool primary, const Common::String &file, Properties &properties) {
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index 35ad5545e6..e1f6e01403 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -102,7 +102,7 @@ public:
VideoPlayer(GobEngine *vm);
~VideoPlayer();
- void evaluateFlags(Properties &properties);
+ void evaluateFlags(Properties &properties, bool allowNonBlock = false);
int openVideo(bool primary, const Common::String &file, Properties &properties);
bool closeVideo(int slot = 0);