diff --git a/src/drivers/win/args.cpp b/src/drivers/win/args.cpp index 2f3076e5..3f97db70 100644 --- a/src/drivers/win/args.cpp +++ b/src/drivers/win/args.cpp @@ -24,6 +24,8 @@ #include "common.h" #include "../common/args.h" +char* RomFile = 0; //Loads a rom file (loads before any other commandline options +int RunInFullscreen = 0; char* MovieToLoad = 0; //Loads a movie file on startup char* StateToLoad = 0; //Loads a savestate on startup (after a movie is loaded, if any) char* ConfigToLoad = 0; //Loads a specific .cfg file (loads before any other commandline options @@ -43,7 +45,9 @@ extern bool turbo; char *ParseArgies(int argc, char *argv[]) { static ARGPSTRUCT FCEUArgs[]={ - {"-pal", &pal_setting_specified, &PAL, 0}, + {"-rom", 0, &RomFile, 0x4001}, + {"-fullscreen", 0, &RunInFullscreen, 0}, + {"-pal", &pal_setting_specified, &PAL, 0}, {"-dendy", &dendy_setting_specified,&dendy, 0}, {"-noicon", 0, &status_icon, 0}, {"-gg", 0, &genie, 0}, diff --git a/src/drivers/win/args.h b/src/drivers/win/args.h index 3ee5d057..eefef32d 100644 --- a/src/drivers/win/args.h +++ b/src/drivers/win/args.h @@ -1,3 +1,5 @@ +extern char* RomFile; //Contains the filename of the rom file in the command line arguments +extern int RunInFullscreen; extern char* MovieToLoad; //Contains the filename of the savestate specified in the command line arguments 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 diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index bec6033b..5eb2099d 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -847,9 +847,9 @@ int main(int argc,char *argv[]) InitSpeedThrottle(); - if (t) + if (RomFile) { - ALoad(t); + ALoad(RomFile); } else { if (AutoResumePlay && romNameWhenClosingEmulator && romNameWhenClosingEmulator[0]) @@ -858,6 +858,11 @@ int main(int argc,char *argv[]) LoadNewGamey(hAppWnd, 0); } + if (RunInFullscreen) { + extern void ToggleFullscreen(); + ToggleFullscreen(); + } + if (PAL && pal_setting_specified && !dendy_setting_specified) dendy = 0; @@ -897,6 +902,8 @@ int main(int argc,char *argv[]) FCEU_LoadLuaCode(LuaToLoad); free(LuaToLoad); LuaToLoad = NULL; + extern HWND LuaConsoleHWnd; + ShowWindow(LuaConsoleHWnd, SW_MINIMIZE); } //Initiates AVI capture mode, will set up proper settings, and close FCUEX once capturing is finished