mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
SCI/new sound code: update sound cues when kGetEvent() is called, instead of kAnimate(), fixes music fading in LSL3
svn-id: r46973
This commit is contained in:
parent
f245917d6f
commit
5560f93c2a
@ -141,6 +141,17 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
|
||||
con->onFrame();
|
||||
}
|
||||
|
||||
#ifndef USE_OLD_MUSIC_FUNCTIONS
|
||||
if (s->detectDoSoundType() <= SCI_VERSION_0_LATE) {
|
||||
// If we're running a SCI0 game, update the sound cues, to compensate
|
||||
// for the fact that SCI0 does not poll to update the sound cues itself,
|
||||
// like SCI01 and later do with cmdUpdateSoundCues. kAnimate is called
|
||||
// quite often, so emulate the SCI01 behavior of cmdUpdateSoundCues with
|
||||
// this call
|
||||
s->_soundCmd->updateSci0Cues();
|
||||
}
|
||||
#endif
|
||||
|
||||
return s->r_acc;
|
||||
}
|
||||
|
||||
|
@ -962,15 +962,6 @@ reg_t kAnimate(EngineState *s, int argc, reg_t *argv) {
|
||||
#ifdef USE_OLD_MUSIC_FUNCTIONS
|
||||
// Take care of incoming events (kAnimate is called semi-regularly)
|
||||
process_sound_events(s);
|
||||
#else
|
||||
if (s->detectDoSoundType() <= SCI_VERSION_0_LATE) {
|
||||
// If we're running a SCI0 game, update the sound cues, to compensate
|
||||
// for the fact that SCI0 does not poll to update the sound cues itself,
|
||||
// like SCI01 and later do with cmdUpdateSoundCues. kAnimate is called
|
||||
// quite often, so emulate the SCI01 behavior of cmdUpdateSoundCues with
|
||||
// this call
|
||||
s->_soundCmd->updateSci0Cues();
|
||||
}
|
||||
#endif
|
||||
|
||||
s->_gui->animate(castListReference, cycle, argc, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user