aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorThierry Crozat2018-10-31 21:37:56 +0000
committerThierry Crozat2018-11-04 22:33:22 +0100
commite2935acfe4a6d332f7b1388fa98fce711cde8c12 (patch)
tree9f1ef23eeb0903fdffc44c15034cbc2c70257d53 /engines
parent71910c2283532a2071aed725835c66afee451e2d (diff)
downloadscummvm-rg350-e2935acfe4a6d332f7b1388fa98fce711cde8c12.tar.gz
scummvm-rg350-e2935acfe4a6d332f7b1388fa98fce711cde8c12.tar.bz2
scummvm-rg350-e2935acfe4a6d332f7b1388fa98fce711cde8c12.zip
ZVISION: Disable MPEG movies when liba52 is not enabled
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/scripting/actions.cpp4
-rw-r--r--engines/zvision/video/video.cpp4
-rw-r--r--engines/zvision/zvision.cpp7
3 files changed, 9 insertions, 6 deletions
diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp
index 794336e4b6..6e02123ee9 100644
--- a/engines/zvision/scripting/actions.cpp
+++ b/engines/zvision/scripting/actions.cpp
@@ -967,9 +967,9 @@ bool ActionStreamVideo::execute() {
bool subtitleExists = _engine->getSearchManager()->hasFile(subname);
bool switchToHires = false;
-// NOTE: We only show the hires MPEG2 videos when libmpeg2 is compiled in,
+// NOTE: We only show the hires MPEG2 videos when libmpeg2 and liba52 are compiled in,
// otherwise we fall back to the lowres ones
-#ifdef USE_MPEG2
+#if defined(USE_MPEG2) && defined(USE_A52)
Common::String hiresFileName = _fileName;
hiresFileName.setChar('d', hiresFileName.size() - 8);
hiresFileName.setChar('v', hiresFileName.size() - 3);
diff --git a/engines/zvision/video/video.cpp b/engines/zvision/video/video.cpp
index 0c19c92574..01e75a4a3d 100644
--- a/engines/zvision/video/video.cpp
+++ b/engines/zvision/video/video.cpp
@@ -23,7 +23,7 @@
#include "common/scummsys.h"
#include "common/system.h"
#include "video/video_decoder.h"
-#ifdef USE_MPEG2
+#if defined(USE_MPEG2) && defined(USE_A52)
#include "video/mpegps_decoder.h"
#endif
#include "engines/util.h"
@@ -48,7 +48,7 @@ Video::VideoDecoder *ZVision::loadAnimation(const Common::String &fileName) {
animation = new RLFDecoder();
else if (tmpFileName.hasSuffix(".avi"))
animation = new ZorkAVIDecoder();
-#ifdef USE_MPEG2
+#if defined(USE_MPEG2) && defined(USE_A52)
else if (tmpFileName.hasSuffix(".vob"))
animation = new Video::MPEGPSDecoder();
#endif
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index 5a53383501..7bd16cb448 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -193,8 +193,11 @@ void ZVision::initialize() {
Graphics::ModeList modes;
modes.push_back(Graphics::Mode(WINDOW_WIDTH, WINDOW_HEIGHT));
+#if defined(USE_MPEG2) && defined(USE_A52)
+ // For the DVD version of ZGI we can play high resolution videos
if (getGameId() == GID_GRANDINQUISITOR && (getFeatures() & GF_DVD))
modes.push_back(Graphics::Mode(HIRES_WINDOW_WIDTH, HIRES_WINDOW_HEIGHT));
+#endif
initGraphicsModes(modes);
initScreen();
@@ -225,8 +228,8 @@ void ZVision::initialize() {
loadSettings();
-#ifndef USE_MPEG2
- // libmpeg2 not loaded, disable the MPEG2 movies option
+#if !defined(USE_MPEG2) || !defined(USE_A52)
+ // libmpeg2 or liba52 not loaded, disable the MPEG2 movies option
_scriptManager->setStateValue(StateKey_MPEGMovies, 2);
#endif