]> skyeroc.xyz Git - dgamelaunch/commitdiff
Fix watching, thanks to Jilles!
authorPasi Kallinen <paxed@alt.org>
Sat, 31 Mar 2007 16:21:58 +0000 (16:21 +0000)
committerPasi Kallinen <paxed@alt.org>
Sat, 31 Mar 2007 16:21:58 +0000 (16:21 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@349 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c
ttyplay.c

index 4003dee95194ba3a30f5ca1c3b0348c6db9fea43..15246cdfab897c5a93d1bff4410bb6f0c8623d37 100644 (file)
@@ -1746,14 +1746,14 @@ main (int argc, char** argv)
   /* for chroot and program execution */
   char atrcfilename[81], *spool, *p, *auth = NULL;
   unsigned int len;
-  int c;
+  int c, i;
   int nhext = 0, nhauth = 0;
   int userchoice;
 
 #ifndef HAVE_SETPROCTITLE
   /* save argc, argv */
   char** saved_argv;
-  int saved_argc, i;
+  int saved_argc;
 
   saved_argc = argc;
 
index 058cec2ce170bb45eac2568f33078c314a16d795..176fcd91b8d8561fd3b13ad3e5588e5680e323f5 100644 (file)
--- a/ttyplay.c
+++ b/ttyplay.c
@@ -148,6 +148,7 @@ ttypread (FILE * fp, Header * h, char **buf, int pread)
   static int kq = -1;
 #endif
   struct timeval w = { 0, 100000 };
+  struct timeval origw = { 0, 100000 };
   int counter = 0;
   fd_set readfs;
   struct termios t;
@@ -209,6 +210,7 @@ ttypread (FILE * fp, Header * h, char **buf, int pread)
        FD_ZERO (&readfs);
        FD_SET (STDIN_FILENO, &readfs);
        n = select (1, &readfs, NULL, NULL, &w);
+       w = origw;
        doread = n >= 1 && FD_ISSET (0, &readfs);
       }
       if (n == -1)