Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/drivers/win/args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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},
Expand Down
2 changes: 2 additions & 0 deletions src/drivers/win/args.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 9 additions & 2 deletions src/drivers/win/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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;

Expand Down Expand Up @@ -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
Expand Down