From 91733a146a8a33cad438b4adae422f7d5ce6f523 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 23 May 2008 04:11:35 +0000 Subject: [PATCH] re-add start from reset flag --- src/driver.h | 6 +++++- src/movie.cpp | 16 +++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/driver.h b/src/driver.h index df94e228..7a520968 100644 --- a/src/driver.h +++ b/src/driver.h @@ -175,9 +175,13 @@ void FCEUI_LoadState(char *fname); void FCEUD_SaveStateAs(void); void FCEUD_LoadStateFrom(void); -//movie was recorded from poweron. the alternative is from a savestate +//movie was recorded from poweron. the alternative is from a savestate (or from reset) #define MOVIE_FLAG_FROM_POWERON (1<<3) +//an ARCHAIC flag which means the movie was recorded from a soft reset. +//WHY would you do this?? do not create any new movies with this flag +#define MOVIE_FLAG_FROM_RESET (1<<1) + #define MOVIE_FLAG_PAL (1<<2) #define MOVIE_MAX_METADATA 512 diff --git a/src/movie.cpp b/src/movie.cpp index 4938a1ba..c3f3db18 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -671,17 +671,11 @@ void FCEUI_SaveMovie(char *fname, uint8 flags, const char* metadata) framets=0; nextd = -1; - //mbg 5/22/08 - I didnt delete this because I thought it was interesting - //// trigger a reset - //if(flags & MOVIE_FLAG_FROM_RESET) - //{ - // if(poweron) - // { - // PowerNES(); // NOTE: this will write an FCEUNPCMD_POWER into the movie file - // } - // else - // ResetNES(); // NOTE: this will write an FCEUNPCMD_RESET into the movie file - //} + // trigger a reset + if(flags & MOVIE_FLAG_FROM_RESET) + { + ResetNES(); // NOTE: this will write an FCEUNPCMD_RESET into the movie file + } if(!fname) FCEUI_SelectMovie(CurrentMovie,1); /* Quick hack to display status. */