File tree Expand file tree Collapse file tree 4 files changed +25
-9
lines changed
Expand file tree Collapse file tree 4 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -543,21 +543,25 @@ Config::_parseArgs(int argc,
543543
544544
545545/* *
546- * Parses first the configuration file, and then overrides with any
547- * command-line options that were specified.
546+ * Parses the configuration file
548547 */
549548int
550- Config::parse (int argc,
551- char **argv)
549+ Config::load ()
552550{
553- int error;
554551
555552 // read the config file
556- error = _load ();
557- if (error) {
558- return error;
553+ return _load ();
559554 }
560555
556+
557+ /* *
558+ * Parses command-line options that were specified.
559+ */
560+ int
561+ Config::parse (int argc,
562+ char **argv)
563+ {
564+
561565 // parse the arguments
562566 return _parseArgs (argc, argv);
563567}
Original file line number Diff line number Diff line change @@ -76,7 +76,13 @@ class Config {
7676 int getOption (const std::string &, double *);
7777
7878 /* *
79- * Parse the arguments. Also read in the configuration file and
79+ * read in the configuration file and
80+ * set the variables accordingly.
81+ */
82+ int load ();
83+
84+ /* *
85+ * Parse the arguments and
8086 * set the variables accordingly.
8187 */
8288 int parse (int , char **);
Original file line number Diff line number Diff line change @@ -228,6 +228,10 @@ Config * InitConfig() {
228228 // fm2 -> srt conversion
229229 config->addOption (" ripsubs" , " SDL.RipSubs" , " " );
230230
231+ // load from save file
232+ config->addOption (" loadStateFile" , " SDL.loadStateFile" , " " );
233+ config->setOption (" SDL.loadStateFile" , " " );
234+
231235 // enable new PPU core
232236 config->addOption (" newppu" , " SDL.NewPPU" , 0 );
233237
Original file line number Diff line number Diff line change @@ -570,6 +570,8 @@ int main(int argc, char *argv[]) {
570570 return -1 ;
571571 }
572572
573+ /* Load config from file */
574+ g_config->load ();
573575 int romIndex = g_config->parse (argc, argv);
574576
575577 // This is here so that a default fceux.cfg will be created on first
You can’t perform that action at this time.
0 commit comments