diff options
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) { |