Added --play option to SDL version for movie playback
This commit is contained in:
parent
04f13170e2
commit
3bb5e96ed3
|
@ -180,6 +180,9 @@ InitConfig()
|
||||||
|
|
||||||
// Allow for input configuration
|
// Allow for input configuration
|
||||||
config->addOption('i', "inputcfg", "SDL.InputCfg", InputCfg);
|
config->addOption('i', "inputcfg", "SDL.InputCfg", InputCfg);
|
||||||
|
|
||||||
|
// video playback
|
||||||
|
config->addOption('z', "play", "SDL.Movie", "");
|
||||||
|
|
||||||
// GamePad 0 - 3
|
// GamePad 0 - 3
|
||||||
for(unsigned int i = 0; i < GAMEPAD_NUM_DEVICES; i++) {
|
for(unsigned int i = 0; i < GAMEPAD_NUM_DEVICES; i++) {
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include "../common/cheat.h"
|
#include "../common/cheat.h"
|
||||||
#include "../../fceu.h"
|
#include "../../fceu.h"
|
||||||
|
#include "../../movie.h"
|
||||||
|
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "dface.h"
|
#include "dface.h"
|
||||||
|
@ -28,6 +29,7 @@
|
||||||
|
|
||||||
#include "../common/configSys.h"
|
#include "../common/configSys.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -90,7 +92,8 @@ char *DriverUsage=
|
||||||
--user s, -u s Sets the nickname to use in network play.\n\
|
--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\
|
--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\
|
--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
|
// global configuration object
|
||||||
|
@ -510,6 +513,15 @@ main(int argc,
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return -1;
|
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
|
// loop playing the game
|
||||||
while(GameInfo) {
|
while(GameInfo) {
|
||||||
|
|
Loading…
Reference in New Issue