From e2935acfe4a6d332f7b1388fa98fce711cde8c12 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 31 Oct 2018 21:37:56 +0000 Subject: ZVISION: Disable MPEG movies when liba52 is not enabled --- engines/zvision/scripting/actions.cpp | 4 ++-- engines/zvision/video/video.cpp | 4 ++-- engines/zvision/zvision.cpp | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'engines') 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 -- cgit v1.2.3