Previous 199869 Revisions Next

r31799 Wednesday 27th August, 2014 at 09:43:30 UTC by Fabio Priuli
Fix for MT05639, which had regressed in rev.30805. nw.

Of course, device options have to be removed *before* the
call of set_system_name (which sets the options of the new
system), or the system is launched with no media options
available! :-)
[src/emu]mame.c

trunk/src/emu/mame.c
r31798r31799
220220      if (m_new_driver_pending)
221221      {
222222         astring old_system_name(m_options.system_name());
223         bool new_system = (old_system_name != m_new_driver_pending->name);
224         // first: if we scheduled a new system, remove device options of the old system
225         // notice that, if we relaunch the same system, there is no effect on the emulation
226         if (new_system)
227            m_options.remove_device_options();
228         // second: set up new system name (and the related device options)
223229         m_options.set_system_name(m_new_driver_pending->name);
224         astring error_string;
225         if (old_system_name != m_options.system_name()) {
226            m_options.remove_device_options();
230         // third: if we scheduled a new system, take also care of ramsize options
231         if (new_system)
232         {
233            astring error_string;
227234            m_options.set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string);
228235         }
229236         firstrun = true;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team