From 0fdd04954ee9395e91db3adf7a1856201e429da3 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 25 May 2010 02:34:10 +0000 Subject: [PATCH] Fix playmovie from beginning for movies that begin with savestate. --- changelog.txt | 3 ++- src/movie.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 43e0b421..527887ff 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ -23-may-2010 - cah4e3 mapper 19 savestate fix mirroring for "Dream Master (J)" corrected to "four-screen" by CRC check +23-may-2010 - adelikat - Fix PlayMovieFromBeginning when using a movie that starts from savestate +23-may-2010 - cah4e3 - mapper 19 savestate fix mirroring for "Dream Master (J)" corrected to "four-screen" by CRC check 23-may-2010 - ugetab - Win32 - Fixed bug involving pausing emulation outside of the debugger, then trying to use the debugger commands, and having teh CPU registers become corrupted. 22-may-2010 - ugetab - Win32 - Made cheat menu's Pause When Active effect immediate. 22-may-2010 - ugetab - Win32 - Enabled multi-select for Cheat menu to allow multiple toggles and deletes. diff --git a/src/movie.cpp b/src/movie.cpp index eb45ba42..cfb9976f 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -1494,6 +1494,18 @@ void FCEUI_MoviePlayFromBeginning(void) movieMode = MOVIEMODE_PLAY; FCEU_DispMessage("Movie is now Read-Only. Playing from beginning.",0); } + else + { + string str = curMovieFilename; + FCEUI_StopMovie(); + if (FCEUI_LoadMovie(str.c_str(),1, 0, 0)) + { + movieMode = MOVIEMODE_PLAY; + movie_readonly=true; + FCEU_DispMessage("Movie is now Read-Only. Playing from beginning.",0); + } + //currMovieData.loadSavestateFrom(&currMovieData.savestate); //TODO: make something like this work instead so it doesn't have to reload + } } }