Previous 199869 Revisions Next

r30805 Tuesday 3rd June, 2014 at 13:03:14 UTC by Miodrag Milanović
Placing reverting options on proper place (nw)
[src/emu]clifront.c emuopts.c mame.c

trunk/src/emu/clifront.c
r30804r30805
197197            throw emu_fatalerror(MAMERR_FATALERROR, NULL);
198198         }
199199      }
200     
201      m_options.parse_standard_inis(option_errors);
200202      // parse the command line, adding any system-specific options
201203      if (!m_options.parse_command_line(argc, argv, option_errors))
202204      {
trunk/src/emu/emuopts.c
r30804r30805
373373
374374bool emu_options::parse_command_line(int argc, char *argv[], astring &error_string)
375375{
376   // remember the original system name
377   astring old_system_name(system_name());
378
379376   // parse as normal
380   bool result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
381
382   // if the system name changed, fix up the device options
383   if (old_system_name != system_name())
384   {
385      // remove any existing device options
386      remove_device_options();
387      result = parse_slot_devices(argc, argv, error_string, NULL, NULL);
388      if (exists(OPTION_RAMSIZE) && old_system_name.len()!=0)
389         set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string);
390   }
391   return result;
377   core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
378   return parse_slot_devices(argc, argv, error_string, NULL, NULL);
392379}
393380
394381
trunk/src/emu/mame.c
r30804r30805
180180      // check the state of the machine
181181      if (new_driver_pending)
182182      {
183         astring old_system_name(options.system_name());
183184         options.set_system_name(new_driver_pending->name);
185         astring error_string;
186         if (old_system_name != options.system_name()) {
187            options.remove_device_options();
188            options.set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string);
189         }
184190         firstrun = true;
185191      }
186192      else

Previous 199869 Revisions Next


© 1997-2024 The MAME Team