summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-08 03:05:06 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-08 03:05:06 +0800
commit59c8dd2e7ad5d33903e85b81cd9ecb264403ac83 (patch)
treef0606ed1eb53c8481ec447abba38052acf0221ba /mbbsd
parentef93e89c2bdd972256bbad62fe6fc8d96cea53e8 (diff)
downloadpttbbs-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.c11
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);
}
}