sdl: world's biggest hack: add --movielength int_num_frames for automated dumping with a good process exit. how was this missing?
This commit is contained in:
parent
2958f2e5df
commit
d54b7388b9
|
@ -222,6 +222,7 @@ InitConfig()
|
||||||
// video playback
|
// video playback
|
||||||
config->addOption("playmov", "SDL.Movie", "");
|
config->addOption("playmov", "SDL.Movie", "");
|
||||||
config->addOption("subtitles", "SDL.SubtitleDisplay", 1);
|
config->addOption("subtitles", "SDL.SubtitleDisplay", 1);
|
||||||
|
config->addOption("movielength", "SDL.MovieLength", 0);
|
||||||
|
|
||||||
config->addOption("fourscore", "SDL.FourScore", 0);
|
config->addOption("fourscore", "SDL.FourScore", 0);
|
||||||
|
|
||||||
|
|
|
@ -525,6 +525,7 @@ void FCEUD_TraceInstruction() {
|
||||||
int noGui = 1;
|
int noGui = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int KillFCEUXonFrame = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main loop for the SDL.
|
* The main loop for the SDL.
|
||||||
|
@ -894,6 +895,8 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
FCEUI_printf("Sorry, I don't know how to play back %s\n", s.c_str());
|
FCEUI_printf("Sorry, I don't know how to play back %s\n", s.c_str());
|
||||||
}
|
}
|
||||||
|
g_config->getOption("SDL.MovieLength",&KillFCEUXonFrame);
|
||||||
|
printf("KillFCEUXonFrame %d\n",KillFCEUXonFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
int periodic_saves;
|
int periodic_saves;
|
||||||
|
|
|
@ -739,6 +739,10 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
|
||||||
extern int KillFCEUXonFrame;
|
extern int KillFCEUXonFrame;
|
||||||
if (KillFCEUXonFrame && (FCEUMOV_GetFrame() >= KillFCEUXonFrame))
|
if (KillFCEUXonFrame && (FCEUMOV_GetFrame() >= KillFCEUXonFrame))
|
||||||
DoFCEUExit();
|
DoFCEUExit();
|
||||||
|
#else
|
||||||
|
extern int KillFCEUXonFrame;
|
||||||
|
if (KillFCEUXonFrame && (FCEUMOV_GetFrame() >= KillFCEUXonFrame))
|
||||||
|
exit(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
timestampbase += timestamp;
|
timestampbase += timestamp;
|
||||||
|
|
Loading…
Reference in New Issue