From: Pasi Kallinen Date: Mon, 13 Sep 2010 16:18:22 +0000 (+0000) Subject: TTY playback fixes from blackpenguin. X-Git-Tag: v1.6.1-roc-dev~134 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=1abe3a111759684994c0295876473d5d8f864a28;p=dgamelaunch TTY playback fixes from blackpenguin. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@576 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- diff --git a/ttyplay.c b/ttyplay.c index 010b851..fbdfdfc 100644 --- a/ttyplay.c +++ b/ttyplay.c @@ -449,9 +449,12 @@ static off_t find_seek_offset_clrscr (FILE * fp) { off_t raw_seek_offset = 0; + off_t raw_seek_offset2 = 0; off_t seek_offset_clrscr; raw_seek_offset = find_last_string_in_file(fp, "\033[2J"); + raw_seek_offset2 = find_last_string_in_file(fp, "\033[H\033[J"); + if (raw_seek_offset2>raw_seek_offset) raw_seek_offset=raw_seek_offset2; seek_offset_clrscr = 0; /* now find last filepos that is less than seek offset */ @@ -534,7 +537,7 @@ ttyplay_main (char *ttyfile, int mode, int resizex, int resizey) new.c_cc[VMIN] = 1; new.c_cc[VTIME] = 0; tcsetattr (0, TCSANOW, &new); /* Make it current */ - + raw(); if (resizex > 0 && resizey > 0) { term_resizex = resizex;