added waiting for key or button after starting or stopping network mode
authorHolger Schemel <info@artsoft.org>
Mon, 1 Oct 2018 20:05:11 +0000 (22:05 +0200)
committerHolger Schemel <info@artsoft.org>
Mon, 1 Oct 2018 20:05:11 +0000 (22:05 +0200)
src/init.c
src/network.c
src/screens.c

index a2eb577274022efd06fddff2b8bc749fa514623d..a7657670cc1ee8e72c9db46cf963186d6e33ea75 100644 (file)
@@ -5684,7 +5684,8 @@ void InitNetworkServer(void)
   }
 
   /* short time to recognize result of network initialization */
-  Delay_WithScreenUpdates(1000);
+  if (game_status == GAME_MODE_LOADING)
+    Delay_WithScreenUpdates(1000);
 }
 
 static boolean CheckArtworkConfigForCustomElements(char *filename)
index 1b9a1386a45cc52381d11282edf3f5028dba92e9..e1bce45a459a58196f664774523e22f657e2fc69 100644 (file)
@@ -1059,7 +1059,4 @@ void DisconnectFromNetworkServer(void)
   HandleNetworkingDisconnect();
 
   DrawNetworkText_Success("Successfully disconnected!");
-
-  /* short time to recognize result of network initialization */
-  Delay_WithScreenUpdates(1000);
 }
index 4967ebde6f9c90a52b384e22f690289423eb07d7..43198fa8a2d5138fdd78c631588cd19802985b79 100644 (file)
@@ -5980,6 +5980,8 @@ static void ToggleNetworkModeIfNeeded(void)
   DrawTextSCentered(ybottom, font_foot,
                    "Press any key or button for setup menu");
 
+  WaitForEventToContinue();
+
   DrawSetupScreen();
 }