diff --git a/src/drivers/win/args.cpp b/src/drivers/win/args.cpp index caa3b155..99c68999 100644 --- a/src/drivers/win/args.cpp +++ b/src/drivers/win/args.cpp @@ -28,6 +28,7 @@ char* StateToLoad = 0; //Loads a savestate on startup (after a movie is loaded, char* ConfigToLoad = 0; //Loads a specific .cfg file (loads before any other commandline options char* LuaToLoad = 0; //Loads a specific lua file char* PaletteToLoad = 0; //Loads a specific palette file +char* AviToLoad = 0; //Starts an avi capture at startup extern bool turbo; // TODO: Parsing arguments needs to be improved a lot. A LOT. @@ -59,6 +60,7 @@ char *ParseArgies(int argc, char *argv[]) {"-turbo",0,&turbo,0}, {"-pause",0,&PauseAfterLoad,0}, {"-cfg",0,&ConfigToLoad,0x4001}, + {"-avi",0,&AviToLoad,0x4001}, {0, 0, 0, 0}, }; diff --git a/src/drivers/win/args.h b/src/drivers/win/args.h index 5511bd6d..a5717e10 100644 --- a/src/drivers/win/args.h +++ b/src/drivers/win/args.h @@ -2,7 +2,8 @@ extern char* MovieToLoad; //Contains the filename of the savestate specified in extern char* StateToLoad; //Contains the filename of the movie file specified in the command line arguments extern char* ConfigToLoad; //Contains the filename of the config file specified in the command line arguments extern char* LuaToLoad; //Contains the filename of the lua script specified in the command line arguments -extern char* PaletteToLoad; //Contains the filename of the palette file specified in teh comman line arguments +extern char* PaletteToLoad; //Contains the filename of the palette file specified in the command line arguments +extern char* AviToLoad; //Contains the filename of the Avi to be captured specified in the command line arguments extern bool replayReadOnlySetting; extern int replayStopFrameSetting; extern int PauseAfterLoad; diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index 7ac39ac6..05f83717 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -799,6 +799,14 @@ int main(int argc,char *argv[]) free(LuaToLoad); LuaToLoad = NULL; } + + if(AviToLoad) + { + FCEUI_AviBegin(AviToLoad); + free(AviToLoad); + AviToLoad = NULL; + } + if (MemWatchLoadOnStart) CreateMemWatch(); if (PauseAfterLoad) FCEUI_ToggleEmulationPause(); SetAutoFirePattern(AFon, AFoff);