SDL: added --pauseframe to pause after frame x

This commit is contained in:
shinydoofy 2009-04-11 04:03:46 +00:00
parent 67c9ed20fd
commit 864afe4264
3 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,4 @@
11-apr-2009 - shinydoofy - sdl - added --pauseframe to pause movie playback on frame x
11-apr-2009 - shinydoofy - sdl - dropped UTFConverter.c from SDL build and added hotkey Q for toggling read-only/read+write movie playback
04-apr-2009 - shinydoofy - fixed fcm->fm2 code once again (this time for good, hopefully). Thanks to Bisqwit!
04-apr-2009 - shinydoofy - Reverted UTF8<->UTF32 code changes to fix up the win32 build for now

View File

@ -186,6 +186,9 @@ InitConfig()
// display input
config->addOption("inputdisplay", "SDL.InputDisplay", 0);
// pause movie playback at frame x
config->addOption("pauseframe", "SDL.PauseFrame", 0);
// overwrite the config file?
config->addOption("no-config", "SDL.NoConfig", 0);

View File

@ -109,6 +109,7 @@ char *DriverUsage="\
--inputcfg d Configures input device d on startup.\n\
--inputdisplay{0|1|2|4}Displays game input.\n\
--playmov f Plays back a recorded movie from filename f.\n\
--pauseframe x Pauses movie playback at frame x.\n\
--fcmconvert f Converts fcm movie file f to fm2.\n\
--no-config {0,1} Don't change the config file";
@ -617,8 +618,11 @@ SDL_GL_LoadLibrary(0);
{
if(fname.find(".fm2") != std::string::npos)
{
FCEUI_printf("Playing back movie located at %s\n", fname.c_str());
FCEUI_LoadMovie(fname.c_str(), false, false, false);
static int pauseframe;
g_config->getOption("SDL.PauseFrame", &pauseframe);
g_config->setOption("SDL.PauseFrame", 0);
FCEUI_printf("Playing back movie located at %s\n", fname.c_str());
FCEUI_LoadMovie(fname.c_str(), false, false, pauseframe ? pauseframe : false);
}
else
{