diff options
-rw-r--r-- | mbbsd/pmore.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index 3869c472..a83948f5 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -443,6 +443,10 @@ MF_Movie mfmovie; mfmovie.frameclk.tv_sec = 1; mfmovie.frameclk.tv_usec = 0; \ } +#define MOVIE_IS_PLAYING() \ + ((mfmovie.mode == MFDISP_MOVIE_PLAYING) || \ + (mfmovie.mode == MFDISP_MOVIE_PLAYING_OLD)) + unsigned char * mf_movieFrameHeader(unsigned char *p, unsigned char *end); @@ -1058,8 +1062,7 @@ mf_display() #if defined(PMORE_USE_ASCII_MOVIE) && !defined(PMORE_USING_POOR_TERM) // For movies, maybe clear() is better. // Let's enable for good terminals (which does not need workarounds) - if (mfmovie.mode == MFDISP_MOVIE_PLAYING || - mfmovie.mode == MFDISP_MOVIE_PLAYING_OLD) + if (MOVIE_IS_PLAYING()) { clear(); move(0, 0); } else @@ -1331,13 +1334,19 @@ mf_display() { #ifdef PMORE_RESTRICT_ANSI_MOVEMENT c = 's'; // "save cursor pos" -#else +#else // PMORE_RESTRICT_ANSI_MOVEMENT // some user cannot live without this. // make them happy. newline_default = newline = MFDISP_NEWLINE_MOVE; - override_attr = ANSI_COLOR(1;37;41); - override_msg = PMORE_MSG_WARN_MOVECMD; -#endif +#ifdef PMORE_USE_ASCII_MOVIE + // relax for movies + if (!MOVIE_IS_PLAYING()) +#endif // PMORE_USE_ASCII_MOVIE + { + override_attr = ANSI_COLOR(1;37;41); + override_msg = PMORE_MSG_WARN_MOVECMD; + } +#endif // PMORE_RESTRICT_ANSI_MOVEMENT needMove2bot = 1; } outc(c); |