diff --git a/changelog.txt b/changelog.txt index 62be668f..abb62b16 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ ---version 2.0.3 yet to be released--- +18-oct-2008 - adelikat - Win32 - added -cfg (config file) command line argument 08-oct-2008 - zeromus - SF [ 2073105 ] Laptop Volume Control keys make FCEUX go crazy and crash 08-oct-2008 - zeromus - SF [ 2073113 ] Child windows inside debugging window get invalid sizes 08-oct-2008 - zeromus - SF [ 2153843 ] Lua ignores second joypad.set() diff --git a/src/drivers/win/args.cpp b/src/drivers/win/args.cpp index 09efcfae..f61eee38 100644 --- a/src/drivers/win/args.cpp +++ b/src/drivers/win/args.cpp @@ -25,6 +25,7 @@ char* MovieToLoad = 0; char* StateToLoad = 0; +char* ConfigToLoad = 0; extern bool turbo; // TODO: Parsing arguments needs to be improved a lot. A LOT. @@ -54,6 +55,7 @@ char *ParseArgies(int argc, char *argv[]) {"-bginput",0,&EnableBackgroundInput,0}, {"-turbo",0,&turbo,0}, {"-pause",0,&PauseAfterLoad,0}, + {"-cfg",0,&ConfigToLoad,0x4001}, {0, 0, 0, 0}, }; diff --git a/src/drivers/win/args.h b/src/drivers/win/args.h index 20689f22..6f7234de 100644 --- a/src/drivers/win/args.h +++ b/src/drivers/win/args.h @@ -1,5 +1,6 @@ -extern char* MovieToLoad; -extern char* StateToLoad; +extern char* MovieToLoad; //Contains the filename of the savestate specified in the command line argument +extern char* StateToLoad; //Contains the filename of the movie file specified in the command line argument +extern char* ConfigToLoad; //Conatins the filename of the config file specified in the command line argument extern bool replayReadOnlySetting; extern int replayStopFrameSetting; extern int PauseAfterLoad; diff --git a/src/drivers/win/help/fceux.chm b/src/drivers/win/help/fceux.chm index f1b2f03e..c44d0357 100644 Binary files a/src/drivers/win/help/fceux.chm and b/src/drivers/win/help/fceux.chm differ diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index 3239f23c..efe84582 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -567,17 +567,18 @@ int main(int argc,char *argv[]) // Get the base directory GetBaseDirectory(); + + // Parse the commandline arguments + t = ParseArgies(argc, argv); + + if (ConfigToLoad) cfgFile.assign(ConfigToLoad); // Load the config information - //sprintf(TempArray,"%s\\fceux.cfg",BaseDirectory.c_str()); sprintf(TempArray,"%s\\%s",BaseDirectory.c_str(),cfgFile.c_str()); LoadConfig(TempArray); initDirectories(); - // Parse the commandline arguments - t = ParseArgies(argc, argv); - //Bleh, need to find a better place for this. { pal_emulation = !!pal_emulation;