From e094a3fbd232a09861dd174a236a68840e669f6f Mon Sep 17 00:00:00 2001 From: jeblanchard Date: Mon, 9 Jun 2008 19:40:06 +0000 Subject: [PATCH] Commit to speed up the movie-replay box -- not tested :( --- src/movie.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/movie.cpp b/src/movie.cpp index 52c1ce6e..779bb77a 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -318,7 +318,7 @@ bool FCEUMOV_Mode(int modemask) } //yuck... another custom text parser. -void LoadFM2(MovieData& movieData, std::istream* fp) +void LoadFM2(MovieData& movieData, std::istream* fp, bool stopAfterHeader = false) { std::string key,value; enum { @@ -349,6 +349,7 @@ void LoadFM2(MovieData& movieData, std::istream* fp) case RECORD: { dorecord: + if (stopAfterHeader) return; MovieRecord record; record.parse(&movieData, fp); movieData.records.push_back(record); @@ -907,7 +908,7 @@ bool FCEUI_MovieGetInfo(const char* fname, MOVIE_INFO* info) MovieData md; std::fstream* fp = FCEUD_UTF8_fstream(fname, "rb"); if(!fp) return false; - LoadFM2(md, fp); + LoadFM2(md, fp, true); fp->close(); delete fp;