From 2b2f7577bc0af71935886907953296962d003466 Mon Sep 17 00:00:00 2001 From: "fabio.olimpieri" Date: Sat, 12 Jan 2013 10:19:24 +0000 Subject: [PATCH] command parsing after conf file loading, argument without "-" loads df0, fixed in emulation menu --- src/gui-sdl/gui-sdl.c | 8 ++++---- src/main.c | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui-sdl/gui-sdl.c b/src/gui-sdl/gui-sdl.c index a314c8e..d3b1173 100644 --- a/src/gui-sdl/gui-sdl.c +++ b/src/gui-sdl/gui-sdl.c @@ -435,11 +435,11 @@ static int get_gfx_aspect_ratio(void) /* Helpers to determine the accuracy */ static int get_emulation_accuracy(void) { - if (currprefs.cpu_compatible == 0 && - currprefs.cpu_cycle_exact == 0) + if (changed_prefs.cpu_compatible == 0 && + changed_prefs.cpu_cycle_exact == 0) return 0; - if (currprefs.cpu_compatible == 1 && - currprefs.cpu_cycle_exact == 0) + if (changed_prefs.cpu_compatible == 1 && + changed_prefs.cpu_cycle_exact == 0) return 1; return 2; } diff --git a/src/main.c b/src/main.c index 6adb47e..aba85cd 100644 --- a/src/main.c +++ b/src/main.c @@ -493,6 +493,7 @@ static void parse_cmdline (int argc, char **argv) if (parse_cmdline_option (&currprefs, argv[i][1], (char*)arg) && extra_arg) i++; } + else strncpy (currprefs.df[0], argv[1], 255); currprefs.df[0][255] = 0; //Load the argument without - in df0 } } } @@ -561,10 +562,11 @@ static void parse_cmdline_and_init_file (int argc, char **argv) #endif } - parse_cmdline (argc, argv); cfgfile_load (&currprefs, SAVEDFILENAME, 0); cfgfile_load (&currprefs, USERFILENAME, 0); + + parse_cmdline (argc, argv); fix_options (); }