retain pause state through poweron process in record/replay commands
This commit is contained in:
parent
7489c70b3d
commit
5c6de85dcb
|
@ -72,7 +72,7 @@ static int RWWrap=0;
|
||||||
//mbg merge 7/18/06 docs
|
//mbg merge 7/18/06 docs
|
||||||
//bit0 indicates whether emulation is paused
|
//bit0 indicates whether emulation is paused
|
||||||
//bit1 indicates whether emulation is in frame step mode
|
//bit1 indicates whether emulation is in frame step mode
|
||||||
static int EmulationPaused=0;
|
int EmulationPaused=0;
|
||||||
bool frameAdvanceRequested=false;
|
bool frameAdvanceRequested=false;
|
||||||
int frameAdvanceDelay;
|
int frameAdvanceDelay;
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#define MOVIE_VERSION 3 // still at 2 since the format itself is still compatible - to detect which version the movie was made with, check the fceu version stored in the movie header (e.g against FCEU_VERSION_NUMERIC)
|
#define MOVIE_VERSION 3 // still at 2 since the format itself is still compatible - to detect which version the movie was made with, check the fceu version stored in the movie header (e.g against FCEU_VERSION_NUMERIC)
|
||||||
|
|
||||||
extern char FileBase[];
|
extern char FileBase[];
|
||||||
|
extern int EmulationPaused;
|
||||||
|
|
||||||
|
|
||||||
//TODO - remove the synchack stuff from the replay gui and require it to be put into the fm2 file
|
//TODO - remove the synchack stuff from the replay gui and require it to be put into the fm2 file
|
||||||
//which the user would have already converted from fcm
|
//which the user would have already converted from fcm
|
||||||
|
@ -417,10 +419,15 @@ void FCEUI_LoadMovie(char *fname, bool _read_only, int _pauseframe)
|
||||||
suppressAddPowerCommand=1;
|
suppressAddPowerCommand=1;
|
||||||
suppressMovieStop=true;
|
suppressMovieStop=true;
|
||||||
{
|
{
|
||||||
|
//we need to save the pause state through this process
|
||||||
|
int oldPaused = EmulationPaused;
|
||||||
|
|
||||||
FCEUGI * gi = FCEUI_LoadGame(lastLoadedGameName, 0);
|
FCEUGI * gi = FCEUI_LoadGame(lastLoadedGameName, 0);
|
||||||
//mbg 5/23/08 - wtf? why would this return null?
|
//mbg 5/23/08 - wtf? why would this return null?
|
||||||
//if(!gi) PowerNES();
|
//if(!gi) PowerNES();
|
||||||
assert(gi);
|
assert(gi);
|
||||||
|
|
||||||
|
EmulationPaused = oldPaused;
|
||||||
}
|
}
|
||||||
suppressMovieStop=false;
|
suppressMovieStop=false;
|
||||||
suppressAddPowerCommand=0;
|
suppressAddPowerCommand=0;
|
||||||
|
@ -508,11 +515,16 @@ void FCEUI_SaveMovie(char *fname, uint8 flags, const char* metadata)
|
||||||
disableBatteryLoading=1;
|
disableBatteryLoading=1;
|
||||||
suppressMovieStop=true;
|
suppressMovieStop=true;
|
||||||
{
|
{
|
||||||
|
//we need to save the pause state through this process
|
||||||
|
int oldPaused = EmulationPaused;
|
||||||
|
|
||||||
// NOTE: this will NOT write an FCEUNPCMD_POWER into the movie file
|
// NOTE: this will NOT write an FCEUNPCMD_POWER into the movie file
|
||||||
FCEUGI* gi = FCEUI_LoadGame(lastLoadedGameName, 0);
|
FCEUGI* gi = FCEUI_LoadGame(lastLoadedGameName, 0);
|
||||||
//mbg 5/23/08 - wtf? why would this return null?
|
//mbg 5/23/08 - wtf? why would this return null?
|
||||||
//if(!gi) PowerNES();
|
//if(!gi) PowerNES();
|
||||||
assert(gi);
|
assert(gi);
|
||||||
|
|
||||||
|
EmulationPaused = oldPaused;
|
||||||
}
|
}
|
||||||
suppressMovieStop=false;
|
suppressMovieStop=false;
|
||||||
disableBatteryLoading=0;
|
disableBatteryLoading=0;
|
||||||
|
|
Loading…
Reference in New Issue