diff options
author | vanfanel | 2015-11-11 17:56:12 +0100 |
---|---|---|
committer | vanfanel | 2015-11-11 17:56:12 +0100 |
commit | 99739a13fe844c807d3cdd87e67e207e888fd48a (patch) | |
tree | 6afbf4763326277efbf528f0bb9e587bf7a01788 /engines/pegasus | |
parent | 37e157a11c3fc731dfdcf6ec6b6a5a448550219b (diff) | |
parent | 7e44493fe8877a3c6a65f83b9ed84a5f59169005 (diff) | |
download | scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.gz scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.bz2 scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.zip |
Merge branch 'master' into dispmanx
Diffstat (limited to 'engines/pegasus')
-rw-r--r-- | engines/pegasus/menu.cpp | 4 | ||||
-rw-r--r-- | engines/pegasus/sound.cpp | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/engines/pegasus/menu.cpp b/engines/pegasus/menu.cpp index 4bbda8fd93..3e9bf540fe 100644 --- a/engines/pegasus/menu.cpp +++ b/engines/pegasus/menu.cpp @@ -258,12 +258,12 @@ void MainMenu::handleInput(const Input &input, const Hotspot *cursorSpot) { bool isDemo = vm->isDemo(); if (input.upButtonDown()) { - if (_menuSelection > (isDemo ? kFirstSelectionDemo : kFirstSelection)) { + if (_menuSelection > (uint32)(isDemo ? kFirstSelectionDemo : kFirstSelection)) { _menuSelection--; updateDisplay(); } } else if (input.downButtonDown()) { - if (_menuSelection < (isDemo ? kLastSelectionDemo : kLastSelection)) { + if (_menuSelection < (uint32)(isDemo ? kLastSelectionDemo : kLastSelection)) { _menuSelection++; updateDisplay(); } diff --git a/engines/pegasus/sound.cpp b/engines/pegasus/sound.cpp index 5b437b81d4..ddcb2be010 100644 --- a/engines/pegasus/sound.cpp +++ b/engines/pegasus/sound.cpp @@ -59,7 +59,15 @@ void Sound::initFromAIFFFile(const Common::String &fileName) { return; } - _stream = Audio::makeAIFFStream(file, DisposeAfterUse::YES); + Audio::RewindableAudioStream *stream = Audio::makeAIFFStream(file, DisposeAfterUse::YES); + + _stream = dynamic_cast<Audio::SeekableAudioStream *>(stream); + + if (!_stream) { + delete stream; + warning("AIFF stream '%s' is not seekable", fileName.c_str()); + return; + } } void Sound::initFromQuickTime(const Common::String &fileName) { |