Closing the terminal while watching a game did not update the # of watchers.
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@555 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
6581664456
commit
f11bf73dd8
15
ttyplay.c
15
ttyplay.c
|
@ -192,14 +192,15 @@ int
|
||||||
ttyread (FILE * fp, Header * h, char **buf, int pread)
|
ttyread (FILE * fp, Header * h, char **buf, int pread)
|
||||||
{
|
{
|
||||||
long offset;
|
long offset;
|
||||||
|
int kb = kbhit();
|
||||||
|
|
||||||
if (kbhit())
|
if (kb == ERR) return READ_QUIT;
|
||||||
{
|
else if (kb) {
|
||||||
const int c = dgl_getch();
|
const int c = dgl_getch();
|
||||||
const int action = ttyplay_keyboard_action(c);
|
const int action = ttyplay_keyboard_action(c);
|
||||||
if (action != READ_DATA)
|
if (action != READ_DATA)
|
||||||
return (action);
|
return (action);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do this BEFORE header read, hlen bug */
|
/* do this BEFORE header read, hlen bug */
|
||||||
offset = ftell (fp);
|
offset = ftell (fp);
|
||||||
|
|
Loading…
Reference in New Issue