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 a2eb577..a765767 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 1b9a138..e1bce45 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 4967ebd..43198fa 100644 (file)
@@ -5980,6 +5980,8 @@ static void ToggleNetworkModeIfNeeded(void)
   DrawTextSCentered(ybottom, font_foot,
                    "Press any key or button for setup menu");
 
+  WaitForEventToContinue();
+
   DrawSetupScreen();
 }