]> skyeroc.xyz Git - dgamelaunch/commitdiff
* Make sure curses will redraw the watch list after 'm' has been used
authorJilles Tjoelker <jilles@stack.nl>
Mon, 23 Aug 2004 12:59:33 +0000 (12:59 +0000)
committerJilles Tjoelker <jilles@stack.nl>
Mon, 23 Aug 2004 12:59:33 +0000 (12:59 +0000)
* ^L and ^R will redraw the entire screen in the watch list

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@334 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c
ttyplay.c

index 98e37aced77fea3961c0ad397d00287648f3b838..44ed1342041508a0dd531a4a2e7982721503e687 100644 (file)
@@ -399,6 +399,10 @@ inprogressmenu ()
        case 'q': case 'Q':
           return;
 
+       case 12: case 18: /* ^L, ^R */
+         clear ();
+         break;
+
         default:
          doresizewin = 0;
          if (isupper (menuchoice))
index a9f4361dc79b6af92f835f7e2884304b3faab902..5ffee95b257757c508fabf306410d694aaee1db7 100644 (file)
--- a/ttyplay.c
+++ b/ttyplay.c
@@ -140,6 +140,7 @@ ttypread (FILE * fp, Header * h, char **buf, int pread)
   int counter = 0;
   fd_set readfs;
   struct timeval w = { 0, 100000 };
+  struct termios t;
 
   /*
    * Read persistently just like tail -f.
@@ -178,19 +179,20 @@ ttypread (FILE * fp, Header * h, char **buf, int pread)
              break;
 
             case 'm':
+             tcgetattr (0, &t);
              if (!loggedin)
              {
                initcurses();
                loginprompt(1);
-               if (!loggedin) return READ_RESTART;
              }
               if (loggedin)
              {
                initcurses ();
                domailuser (chosen_name);
-                return READ_RESTART;
              }
-             
+              endwin ();
+             tcsetattr (0, TCSANOW, &t);
+              return READ_RESTART;
               break;
             }
         }