Add -playmovie (the "old-fashioned" way)

This commit is contained in:
jeblanchard 2008-05-29 08:15:20 +00:00
parent ce72bbad0b
commit 52b203b8a2
3 changed files with 13 additions and 3 deletions

View File

@ -23,6 +23,8 @@
#include "common.h" #include "common.h"
#include "../common/args.h" #include "../common/args.h"
char* MovieToLoad = 0;
// TODO: Parsing arguments needs to be improved a lot. A LOT. // TODO: Parsing arguments needs to be improved a lot. A LOT.
/** /**
@ -39,6 +41,7 @@ char *ParseArgies(int argc, char *argv[])
//{"-nofs",0,&eoptions,0}, //{"-nofs",0,&eoptions,0},
{"-clipsides",0,&eoptions,0x8000|EO_CLIPSIDES}, {"-clipsides",0,&eoptions,0x8000|EO_CLIPSIDES},
{"-nothrottle",0,&eoptions,0x8000|EO_NOTHROTTLE}, {"-nothrottle",0,&eoptions,0x8000|EO_NOTHROTTLE},
{"-playmovie",0,&MovieToLoad,0x4001},
}; };
if(argc <= 1) if(argc <= 1)

View File

@ -1 +1,2 @@
extern char* MovieToLoad;
char *ParseArgies(int argc, char *argv[]); char *ParseArgies(int argc, char *argv[]);

View File

@ -671,8 +671,6 @@ int main(int argc,char *argv[])
InitSpeedThrottle(); InitSpeedThrottle();
UpdateCheckedMenuItems();
if(t) if(t)
{ {
ALoad(t); ALoad(t);
@ -683,7 +681,15 @@ int main(int argc,char *argv[])
} }
if(MovieToLoad)
{
FCEUI_LoadMovie(MovieToLoad, 1, 0);
free(MovieToLoad);
MovieToLoad = NULL;
}
if (MemWatchLoadOnStart) CreateMemWatch(); if (MemWatchLoadOnStart) CreateMemWatch();
UpdateCheckedMenuItems();
doloopy: doloopy:
UpdateFCEUWindow(); UpdateFCEUWindow();
if(GameInfo) if(GameInfo)