X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=79c2bae71a65c82449c89f881ea05b29bcf63856;hb=fd0ec980e5c4c22978545aa72a2b0b9da0944de7;hp=50f6775bbaa2c6fc08129c04ebadcbd9efd4ad5e;hpb=023dd1a5d064b6a2fbfb8145af8c61261ea53886;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 50f6775b..79c2bae7 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2820,9 +2820,13 @@ void ShowEnvelope(int envelope_nr) int anim_mode = graphic_info[graphic].anim_mode; int main_anim_mode = (anim_mode == ANIM_NONE ? ANIM_VERTICAL|ANIM_HORIZONTAL: anim_mode == ANIM_DEFAULT ? ANIM_VERTICAL : anim_mode); + boolean overlay_enabled = GetOverlayEnabled(); game.envelope_active = TRUE; // needed for RedrawPlayfield() events + SetOverlayEnabled(FALSE); + UnmapAllGadgets(); + PlayMenuSoundStereo(sound_opening, SOUND_MIDDLE); if (anim_mode == ANIM_DEFAULT) @@ -2835,6 +2839,9 @@ void ShowEnvelope(int envelope_nr) else WaitForEventToContinue(); + RemapAllGadgets(); + SetOverlayEnabled(overlay_enabled); + PlayMenuSoundStereo(sound_closing, SOUND_MIDDLE); if (anim_mode != ANIM_NONE) @@ -4245,7 +4252,8 @@ void WaitForEventToContinue(void) still_wait = FALSE; } - BackToFront(); + if (!PendingEvent()) + BackToFront(); } }