fixed some bugs with (not) displaying virtual buttons
[rocksndiamonds.git] / src / game.c
index fd774e84c30b33e2c80ad0ae00346e2dc8fdf101..71740a8f4931186bbcd5a08847518cef733528d5 100644 (file)
@@ -11364,6 +11364,15 @@ static void GameActionsExt(void)
 
   SetVideoFrameDelay(game_frame_delay_value);
 
+  // (de)activate virtual buttons depending on current game status
+  if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS))
+  {
+    if (game.all_players_gone) // if no players there to be controlled anymore
+      SetOverlayActive(FALSE);
+    else if (!tape.playing)    // if game continues after tape stopped playing
+      SetOverlayActive(TRUE);
+  }
+
 #if 0
 #if 0
   // ---------- main game synchronization point ----------