mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
Fixed MT06019: Wrong default bios outputted with -listxml command.
This commit is contained in:
parent
94007d2887
commit
6be4d8312c
@ -519,6 +519,12 @@ void info_xml_creator::output_bios()
|
|||||||
if (m_drivlist.driver().rom == nullptr)
|
if (m_drivlist.driver().rom == nullptr)
|
||||||
return;
|
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
|
// iterate over ROM entries and look for BIOSes
|
||||||
for (const rom_entry *rom = m_drivlist.driver().rom; !ROMENTRY_ISEND(rom); rom++)
|
for (const rom_entry *rom = m_drivlist.driver().rom; !ROMENTRY_ISEND(rom); rom++)
|
||||||
if (ROMENTRY_ISSYSTEM_BIOS(rom))
|
if (ROMENTRY_ISSYSTEM_BIOS(rom))
|
||||||
@ -527,7 +533,7 @@ void info_xml_creator::output_bios()
|
|||||||
fprintf(m_output, "\t\t<biosset");
|
fprintf(m_output, "\t\t<biosset");
|
||||||
fprintf(m_output, " name=\"%s\"", xml_normalize_string(ROM_GETNAME(rom)));
|
fprintf(m_output, " name=\"%s\"", xml_normalize_string(ROM_GETNAME(rom)));
|
||||||
fprintf(m_output, " description=\"%s\"", xml_normalize_string(ROM_GETHASHDATA(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, " default=\"yes\"");
|
||||||
fprintf(m_output, "/>\n");
|
fprintf(m_output, "/>\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user