added clearing event queue after fading and after door/envelope requests
authorHolger Schemel <info@artsoft.org>
Sat, 14 Jul 2018 11:47:17 +0000 (13:47 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 14 Jul 2018 11:47:17 +0000 (13:47 +0200)
src/tools.c

index 63bff391ce32a9c3c82b0dba25dfa8a863abf79a..ab6c4efa28f32b808b095e4955afc0966798750a 100644 (file)
@@ -981,6 +981,8 @@ static void FadeExt(int fade_mask, int fade_mode, int fade_type)
                draw_border_function);
 
   redraw_mask &= ~fade_mask;
+
+  ClearEventQueue();
 }
 
 static void SetScreenStates_BeforeFadingIn()
@@ -2800,6 +2802,8 @@ void AnimateEnvelope(int envelope_nr, int anim_mode, int action)
 
     SkipUntilDelayReached(&anim_delay, anim_delay_value, &i, last_frame);
   }
+
+  ClearEventQueue();
 }
 
 void ShowEnvelope(int envelope_nr)
@@ -3083,6 +3087,8 @@ void AnimateEnvelopeRequest(int anim_mode, int action)
 
     SkipUntilDelayReached(&anim_delay, anim_delay_value, &i, last_frame);
   }
+
+  ClearEventQueue();
 }
 
 void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
@@ -5419,6 +5425,8 @@ unsigned int MoveDoor(unsigned int door_state)
   DrawMaskedBorder(REDRAW_DOOR_1);
   DrawMaskedBorder(REDRAW_DOOR_2);
 
+  ClearEventQueue();
+
   return (door1 | door2);
 }