Skip to content

Commit

Permalink
Clear BIOS option setting when reloading empty pseudo-driver to preve…
Browse files Browse the repository at this point in the history
…nt spurious ROM loading errors for this and other drivers
  • Loading branch information
ajrhacker committed Dec 20, 2022
1 parent 2b18382 commit aee2e13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/frontend/mame/mame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ int mame_machine_manager::execute()
else
{
if (machine.exit_pending())
{
m_options.set_system_name("");
m_options.set_value(OPTION_BIOS, "", OPTION_PRIORITY_CMDLINE);
}
}

if (machine.exit_pending() && (!started_empty || is_empty))
Expand Down

2 comments on commit aee2e13

@cuavas
Copy link
Member

@cuavas cuavas commented on aee2e13 Dec 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a solution. It produces the wrong behaviour when you use -bios on the command line and them use "select new machine". For example using -bios japan and switching between Neo Geo games. MAME needs a way to "peel off" a layer of options so to speak. It needs to be independent of priority levels.

@ajrhacker
Copy link
Contributor Author

@ajrhacker ajrhacker commented on aee2e13 Dec 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, the empty pseudo-driver is never selected, so it doesn't go through this path (and instead malfunctions when any system not using BIOSes is selected).

Note that the empty pseudo-driver has a null ROM definition, so retaining any BIOS option for it will cause the ROM loader to generate an error message (even if the UI doesn't show it).

Please sign in to comment.