src/main.c

changeset 34
c4d4b8a8f902
parent 33
866025982aa9
child 35
6c64b7a073af
--- a/src/main.c	Wed Apr 09 11:12:04 2014 +0200
+++ b/src/main.c	Wed Apr 09 12:07:47 2014 +0200
@@ -165,7 +165,7 @@
         return EXIT_SUCCESS;
     }    
     initscr();
-    halfdelay(10);
+    halfdelay(1);
     keypad(stdscr, TRUE);
     if (has_colors()) {
         start_color();
@@ -181,8 +181,12 @@
     if (settings.singlemachine) {
         game_start_singlemachine(&settings);
     } else {
-        return is_server(&settings) ?
+        int exitcode = is_server(&settings) ?
             server_run(&settings) : client_run(&settings);
+        
+        if (exitcode != EXIT_SUCCESS) {
+            cbreak(); getch();
+        }
     }
 }
 

mercurial