fixed and improved single step mode for all game engines
[rocksndiamonds.git] / src / tools.c
index 1ea116bab181f892eb1280285b3203743873a9c7..d15f800e638e3534adc600d1db7b08694efcc5a7 100644 (file)
@@ -3759,6 +3759,10 @@ void WaitForEventToContinue()
       {
        case EVENT_BUTTONPRESS:
        case EVENT_KEYPRESS:
+#if defined(TARGET_SDL2)
+        case SDL_CONTROLLERBUTTONDOWN:
+#endif
+        case SDL_JOYBUTTONDOWN:
          still_wait = FALSE;
          break;
 
@@ -8366,8 +8370,15 @@ void CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame,
 void CheckSingleStepMode_SP(boolean murphy_is_waiting,
                            boolean murphy_is_dropping)
 {
+  boolean murphy_starts_dropping = FALSE;
+  int i;
+
+  for (i = 0; i < MAX_PLAYERS; i++)
+    if (stored_player[i].force_dropping)
+      murphy_starts_dropping = TRUE;
+
   if (tape.single_step && tape.recording && !tape.pausing)
-    if (murphy_is_waiting)
+    if (murphy_is_waiting && !murphy_starts_dropping)
       TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
 
   CheckSaveEngineSnapshot_SP(murphy_is_waiting, murphy_is_dropping);