Changed delay method to not break when a modifier key is pressed

svn-id: r29870
This commit is contained in:
Paul Gilbert 2007-12-16 08:10:47 +00:00
parent a9ced688bc
commit 2a8166dde5

View file

@ -42,7 +42,7 @@ AnimAbortType AnimationSequence::delay(uint32 milliseconds) {
while (g_system->getMillis() < delayCtr) { while (g_system->getMillis() < delayCtr) {
while (events.pollEvent()) { while (events.pollEvent()) {
if (events.type() == Common::EVENT_KEYDOWN) { if ((events.type() == Common::EVENT_KEYDOWN) && (events.event().kbd.ascii != 0)) {
if (events.event().kbd.keycode == Common::KEYCODE_ESCAPE) return ABORT_END_INTRO; if (events.event().kbd.keycode == Common::KEYCODE_ESCAPE) return ABORT_END_INTRO;
else return ABORT_NEXT_SCENE; else return ABORT_NEXT_SCENE;
} else if (events.type() == Common::EVENT_LBUTTONDOWN) } else if (events.type() == Common::EVENT_LBUTTONDOWN)
@ -140,7 +140,9 @@ AnimAbortType AnimationSequence::show() {
// Loop through displaying the animations // Loop through displaying the animations
while ((_pPixels < _pPixelsEnd) && (_pLines < _pLinesEnd)) { while ((_pPixels < _pPixelsEnd) && (_pLines < _pLinesEnd)) {
if ((soundFrame != NULL) && (frameCtr == 0)) if ((soundFrame != NULL) && (frameCtr == 0))
Sound.musicInterface_Play(soundFrame->soundId, soundFrame->channelNum); Sound.musicInterface_Play(
Sound.isRoland() ? soundFrame->rolandSoundId : soundFrame->adlibSoundId,
soundFrame->channelNum);
decodeFrame(_pPixels, _pLines); decodeFrame(_pPixels, _pLines);