SLUDGE: Skip movie incase scummvm isn't built with libvpx as a dependancy

This commit is contained in:
hax0kartik 2023-03-04 22:41:41 +05:30 committed by Eugene Sandulenko
parent 35c775113a
commit 234e1cac49

View File

@ -27,6 +27,7 @@
#include "sludge/newfatal.h"
#include "sludge/sound.h"
#include "common/scummsys.h" // for USE_VPX
#include "common/substream.h"
#include "video/mkv_decoder.h"
#include "graphics/blit.h"
@ -42,8 +43,12 @@ int playMovie(int fileNumber) {
if (!(fsize = g_sludge->_resMan->openFileFromNum(fileNumber)))
return fatal("playMovie(): Can't open movie");
#if !defined(USE_VPX)
warning("Sludge::playMovie - VPX support not compiled in, skipping movie");
#else
Video::MKVDecoder decoder;
Common::SeekableReadStream *stream = g_sludge->_resMan->getData();
Common::SeekableSubReadStream video(stream, stream->pos(), stream->pos() + fsize);
@ -85,6 +90,7 @@ int playMovie(int fileNumber) {
}
}
}
#endif
movieIsPlaying = kMovieNothing;