fixed bug with handling mouse events after clicking clickable animations
[rocksndiamonds.git] / src / events.c
index aa20e2d056999b116d555048a73ad704b2a0a564..e575a9814d2cfde95f9bcfb8c4f1067ff01aca77 100644 (file)
@@ -1275,7 +1275,7 @@ void HandleButton(int mx, int my, int button, int button_nr)
   if (HandleGlobalAnimClicks(mx, my, button))
   {
     /* do not handle this button event anymore */
-    mx = my = -32;     /* force mouse event to be outside screen tiles */
+    return;            /* force mouse event not to be handled at all */
   }
 
   if (button_hold && game_status == GAME_MODE_PLAYING && tape.pausing)
@@ -1441,6 +1441,11 @@ static void HandleKeysSpecial(Key key)
     {
       SaveNativeLevel(&level);
     }
+    else if (is_string_suffix(cheat_input, ":frames-per-second") ||
+            is_string_suffix(cheat_input, ":fps"))
+    {
+      global.show_frames_per_second = !global.show_frames_per_second;
+    }
   }
   else if (game_status == GAME_MODE_PLAYING)
   {