Previous 15994 Revisions Next

r10102 Wednesday 19th January, 2011 at 08:13:23 UTC by Miodrag Milanović
Revert back change in clifront.c since errors caused.
[src/emu]clifront.c

src/emu/clifront.c
r10101r10102
127127      /* initialize the options manager and add the CLI-specific options */
128128      options = mame_options_init(osd_options);
129129      options_add_entries(options, cli_options);
130     
131      gamename_option = "";
132      for (int arg = 1; arg < argc; arg++)
130
131      /* parse the command line first; if we fail here, we're screwed */
132      if (options_parse_command_line(options, argc, argv, OPTION_PRIORITY_CMDLINE))
133133      {
134         if ((argv[arg][0] != '-')) {
135            gamename_option = argv[arg];
136            break;
137         }
134         result = MAMERR_INVALID_CONFIG;
135         goto error;
138136      }
139137
138      /* parse the simple commmands before we go any further */
139      core_filename_extract_base(&exename, argv[0], TRUE);
140      result = execute_simple_commands(options, exename);
141      if (result != -1)
142         goto error;
143
140144      /* find out what game we might be referring to */
145      gamename_option = options_get_string(options, OPTION_GAMENAME);
141146      core_filename_extract_base(&gamename, gamename_option, TRUE);
142147      driver = driver_get_name(gamename);
143148
149      /* execute any commands specified */     
150      result = execute_commands(options, exename, driver);
151      if (result != -1)
152         goto error;
153
144154      /* if we don't have a valid driver selected, offer some suggestions */
145155      if (strlen(gamename_option) > 0 && driver == NULL)
146156      {
r10101r10102
162172         goto error;
163173      }
164174
165      /* parse the command line first; if we fail here, we're screwed */
166      if (options_parse_command_line(options, argc, argv, OPTION_PRIORITY_CMDLINE))
167      {
168         result = MAMERR_INVALID_CONFIG;
169         goto error;
170      }
171
172      /* parse the simple commmands before we go any further */
173      core_filename_extract_base(&exename, argv[0], TRUE);
174      result = execute_simple_commands(options, exename);
175      if (result != -1)
176         goto error;
177
178      /* execute any commands specified */
179      result = execute_commands(options, exename, driver);
180      if (result != -1)
181         goto error;
182
183175      /* run the game */
184176      result = mame_execute(osd, options);
185177   }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team