Added --play option to SDL version for movie playback

This commit is contained in:
punkrockguy318 2008-07-23 05:14:45 +00:00
parent 04f13170e2
commit 3bb5e96ed3
2 changed files with 16 additions and 1 deletions

View File

@ -180,6 +180,9 @@ InitConfig()
// Allow for input configuration
config->addOption('i', "inputcfg", "SDL.InputCfg", InputCfg);
// video playback
config->addOption('z', "play", "SDL.Movie", "");
// GamePad 0 - 3
for(unsigned int i = 0; i < GAMEPAD_NUM_DEVICES; i++) {

View File

@ -18,6 +18,7 @@
#include "../common/cheat.h"
#include "../../fceu.h"
#include "../../movie.h"
#include "input.h"
#include "dface.h"
@ -28,6 +29,7 @@
#include "../common/configSys.h"
#ifdef WIN32
#include <windows.h>
#endif
@ -90,7 +92,8 @@ char *DriverUsage=
--user s, -u s Sets the nickname to use in network play.\n\
--pass s, -w s Sets password to use for connecting to the server.\n\
--netkey s, -k s Uses key 's' to create a unique session for the game loaded.\n\
--players x, -l x Sets the number of local players.\n";
--players x, -l x Sets the number of local players.\n\
--play f Plays back a recorded movie from filename f.\n";
// global configuration object
@ -510,6 +513,15 @@ main(int argc,
SDL_Quit();
return -1;
}
// movie playback
std::string fname;
g_config->getOption("SDL.Movie", &fname);
if (fname != "")
{
FCEUI_LoadMovie((char*)fname.c_str(), false, false, false);
g_config->setOption("SDL.Movie", "");
}
// loop playing the game
while(GameInfo) {