From 33d0a03b34226f81fc32af6df588c9d664342531 Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 4 May 2009 13:38:41 +0000 Subject: [PATCH] Win32 - Stop movie at frame x feature - fixed off by 1 error --- changelog.txt | 1 + src/movie.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 9f97496c..12521f5b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +02-may-2009 - adelikat - win32 - stop movie at frame x feature - fixed off by 1 error 23-apr-2009 - shinydoofy - sdl - added --ripsubs for converting fm2 movie subtitles to an srt file 15-apr-2009 - shinydoofy - sdl - Lua is optional again, fixed the real issue 14-apr-2009 - punkrockguy - sdl - LUA is NO longer optional, so the SConscripts have been updated to reflect that change. This fixes the mysterious non-working input issue. diff --git a/src/movie.cpp b/src/movie.cpp index 899a1c69..c287ba93 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -434,7 +434,7 @@ bool FCEUI_GetLagged(void) bool FCEUMOV_ShouldPause(void) { - if(pauseframe && currFrameCounter == pauseframe) + if(pauseframe && currFrameCounter == (pauseframe-1)) //adelikat: changed to pauseframe -1 to prevent an off by 1 error. THis is probably the hackiest solution but I think it would cause some major restructuring to fix it properly. { pauseframe = 0; //only pause once! return true;