| 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 |
| r30804 | r30805 | |
|---|---|---|
| 197 | 197 | throw emu_fatalerror(MAMERR_FATALERROR, NULL); |
| 198 | 198 | } |
| 199 | 199 | } |
| 200 | ||
| 201 | m_options.parse_standard_inis(option_errors); | |
| 200 | 202 | // parse the command line, adding any system-specific options |
| 201 | 203 | if (!m_options.parse_command_line(argc, argv, option_errors)) |
| 202 | 204 | { |
| r30804 | r30805 | |
|---|---|---|
| 373 | 373 | |
| 374 | 374 | bool emu_options::parse_command_line(int argc, char *argv[], astring &error_string) |
| 375 | 375 | { |
| 376 | // remember the original system name | |
| 377 | astring old_system_name(system_name()); | |
| 378 | ||
| 379 | 376 | // 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); | |
| 392 | 379 | } |
| 393 | 380 | |
| 394 | 381 |
| r30804 | r30805 | |
|---|---|---|
| 180 | 180 | // check the state of the machine |
| 181 | 181 | if (new_driver_pending) |
| 182 | 182 | { |
| 183 | astring old_system_name(options.system_name()); | |
| 183 | 184 | 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 | } | |
| 184 | 190 | firstrun = true; |
| 185 | 191 | } |
| 186 | 192 | else |
| Previous | 199869 Revisions | Next |