diff options
-rw-r--r-- | src/emu/info.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/emu/info.cpp b/src/emu/info.cpp index f427d017795..861414aa2c0 100644 --- a/src/emu/info.cpp +++ b/src/emu/info.cpp @@ -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"); } |