aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-11 15:35:32 +0200
committerEinar Johan Trøan Sømåen2012-06-11 15:35:32 +0200
commit63efd7619221f4c4591c65c2ca3419006586ccbc (patch)
tree754599f3e93feb3a23d5dab59d5c6d9a4ee25fcd /engines
parentef2eb685ddc94401d3981af863988f4e084fe02b (diff)
downloadscummvm-rg350-63efd7619221f4c4591c65c2ca3419006586ccbc.tar.gz
scummvm-rg350-63efd7619221f4c4591c65c2ca3419006586ccbc.tar.bz2
scummvm-rg350-63efd7619221f4c4591c65c2ca3419006586ccbc.zip
WINTERMUTE: Make Theora-playback fail properly when THEORA isn't compiled in.
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/Base/BGame.cpp6
-rw-r--r--engines/wintermute/video/VidTheoraPlayer.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp
index 074aad18ff..60a2ee1f28 100644
--- a/engines/wintermute/Base/BGame.cpp
+++ b/engines/wintermute/Base/BGame.cpp
@@ -1476,7 +1476,11 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS
}
else Stack->PushBool(false);
}
- else Stack->PushBool(false);
+ else {
+ Stack->PushBool(false);
+ delete _theoraPlayer;
+ _theoraPlayer = NULL;
+ }
return S_OK;
}
diff --git a/engines/wintermute/video/VidTheoraPlayer.cpp b/engines/wintermute/video/VidTheoraPlayer.cpp
index 6820dbe809..048027be2c 100644
--- a/engines/wintermute/video/VidTheoraPlayer.cpp
+++ b/engines/wintermute/video/VidTheoraPlayer.cpp
@@ -116,7 +116,7 @@ HRESULT CVidTheoraPlayer::initialize(const Common::String &filename, const Commo
if (!_file) return E_FAIL;
//if (Filename != _filename) CBUtils::SetString(&_filename, Filename);
-#if defined (USE_THEORA)
+#if defined (USE_THEORADEC)
_theoraDecoder = new TheoraDecoder();
#else
return E_FAIL;