From 8c174ae9b21f706d055d66d0129dfe3b426029b7 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 14 Nov 2008 13:35:01 +0000 Subject: [PATCH] Oops, fixed the bug I introduced. Frame display toggle now works. --- src/movie.cpp | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/movie.cpp b/src/movie.cpp index 5f19d208..cffd97bf 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -934,25 +934,27 @@ void FCEUMOV_AddCommand(int cmd) void FCEU_DrawMovies(uint8 *XBuf) { - if(frame_display - && movieMode != MOVIEMODE_INACTIVE) + if(frame_display) { - - char counterbuf[32] = {0}; - if(movieMode == MOVIEMODE_PLAY) - sprintf(counterbuf,"%d/%d",currFrameCounter,currMovieData.records.size()); - else if(movieMode == MOVIEMODE_RECORD) - sprintf(counterbuf,"%d",currMovieData.records.size()); - - if(counterbuf[0]) - DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80); - } - else - { - char counterbuf[32] = {0}; - sprintf(counterbuf,"%d (no movie)",currFrameCounter); - if(counterbuf[0]) - DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80); + if (movieMode != MOVIEMODE_INACTIVE) + { + + char counterbuf[32] = {0}; + if(movieMode == MOVIEMODE_PLAY) + sprintf(counterbuf,"%d/%d",currFrameCounter,currMovieData.records.size()); + else if(movieMode == MOVIEMODE_RECORD) + sprintf(counterbuf,"%d",currMovieData.records.size()); + + if(counterbuf[0]) + DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80); + } + else + { + char counterbuf[32] = {0}; + sprintf(counterbuf,"%d (no movie)",currFrameCounter); + if(counterbuf[0]) + DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80); + } } }