mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
Fixed MT06019: Wrong default bios outputted with -listxml command.
This commit is contained in:
parent
94007d2887
commit
6be4d8312c
@ -518,6 +518,12 @@ void info_xml_creator::output_bios()
|
||||
// skip if no ROMs
|
||||
if (m_drivlist.driver().rom == nullptr)
|
||||
return;
|
||||
|
||||
// first determine the default BIOS name
|
||||
std::string defaultname;
|
||||
for (const rom_entry *rom = m_drivlist.driver().rom; !ROMENTRY_ISEND(rom); rom++)
|
||||
if (ROMENTRY_ISDEFAULT_BIOS(rom))
|
||||
defaultname = ROM_GETNAME(rom);
|
||||
|
||||
// iterate over ROM entries and look for BIOSes
|
||||
for (const rom_entry *rom = m_drivlist.driver().rom; !ROMENTRY_ISEND(rom); rom++)
|
||||
@ -527,7 +533,7 @@ void info_xml_creator::output_bios()
|
||||
fprintf(m_output, "\t\t<biosset");
|
||||
fprintf(m_output, " name=\"%s\"", xml_normalize_string(ROM_GETNAME(rom)));
|
||||
fprintf(m_output, " description=\"%s\"", xml_normalize_string(ROM_GETHASHDATA(rom)));
|
||||
if (ROM_GETBIOSFLAGS(rom) == 1)
|
||||
if (defaultname == ROM_GETNAME(rom))
|
||||
fprintf(m_output, " default=\"yes\"");
|
||||
fprintf(m_output, "/>\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user