fixed handling global animation key actions when mouse button is pressed
[rocksndiamonds.git] / src / anim.c
index 2ebf520f79d793a365b5acdedfbdc77a5ea263e5..71f9958857020ce938ee3edc49277b18333fa9a0 100644 (file)
@@ -1795,7 +1795,7 @@ static void ResetGlobalAnim_Clicked(void)
   InitGlobalAnim_Clicked(-1, -1, ANIM_CLICKED_RESET);
 }
 
-boolean HandleGlobalAnimClicks(int mx, int my, int button)
+boolean HandleGlobalAnimClicks(int mx, int my, int button, boolean force_click)
 {
   static boolean click_consumed = FALSE;
   static int last_button = 0;
@@ -1803,6 +1803,9 @@ boolean HandleGlobalAnimClicks(int mx, int my, int button)
   boolean release_event;
   boolean click_consumed_current = click_consumed;
 
+  if (button != 0 && force_click)
+    last_button = 0;
+
   // check if button state has changed since last invocation
   press_event   = (button != 0 && last_button == 0);
   release_event = (button == 0 && last_button != 0);