diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-08 03:05:06 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-08 03:05:06 +0800 |
commit | 59c8dd2e7ad5d33903e85b81cd9ecb264403ac83 (patch) | |
tree | f0606ed1eb53c8481ec447abba38052acf0221ba /mbbsd | |
parent | ef93e89c2bdd972256bbad62fe6fc8d96cea53e8 (diff) | |
download | pttbbs-59c8dd2e7ad5d33903e85b81cd9ecb264403ac83.tar pttbbs-59c8dd2e7ad5d33903e85b81cd9ecb264403ac83.tar.gz pttbbs-59c8dd2e7ad5d33903e85b81cd9ecb264403ac83.tar.bz2 pttbbs-59c8dd2e7ad5d33903e85b81cd9ecb264403ac83.tar.lz pttbbs-59c8dd2e7ad5d33903e85b81cd9ecb264403ac83.tar.xz pttbbs-59c8dd2e7ad5d33903e85b81cd9ecb264403ac83.tar.zst pttbbs-59c8dd2e7ad5d33903e85b81cd9ecb264403ac83.zip |
pmore: ascii movie: linux specific fix
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2794 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/pmore.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index 257deae2..aaf7e1b4 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -321,7 +321,8 @@ typedef struct { MF_Movie mfmovie; -#define RESET_MOVIE() { mfmovie.mode = MFDISP_MOVIE_UNKNOWN; mfmovie.compat24 = 1; \ +#define RESET_MOVIE() { mfmovie.mode = MFDISP_MOVIE_UNKNOWN; \ + mfmovie.compat24 = 1; \ mfmovie.synctime.tv_sec = mfmovie.synctime.tv_usec = 0; \ mfmovie.frameclk.tv_sec = mfmovie.frameclk.tv_usec = 0; } @@ -2079,6 +2080,7 @@ pmore(char *fpath, int promptend) sscanf(buf, "%f", &nf); RESET_MOVIE(); + mfmovie.mode = MFDISP_MOVIE_PLAYING_OLD; float2tv(nf, &mfmovie.frameclk); mfmovie.compat24 = 0; /* are we really going to start? check termsize! */ @@ -2095,7 +2097,6 @@ pmore(char *fpath, int promptend) else mfmovie.compat24 = 1; } - mfmovie.mode = MFDISP_MOVIE_PLAYING_OLD; mf_determinemaxdisps(0, 0); // display until last line MFDISP_DIRTY(); } @@ -2209,7 +2210,11 @@ int mf_movieSyncFrame() return !pmore_wait_input(&dv); } else { /* synchronize each frame clock model */ - return !pmore_wait_input(&mfmovie.frameclk); + /* because Linux will change the timeval passed to select, + * let's use a temp value here. + */ + struct timeval dv = mfmovie.frameclk; + return !pmore_wait_input(&dv); } } |