summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/selmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/selmenu.cpp')
-rw-r--r--src/frontend/mame/ui/selmenu.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/frontend/mame/ui/selmenu.cpp b/src/frontend/mame/ui/selmenu.cpp
index 03b749ea8a0..00ccd64548a 100644
--- a/src/frontend/mame/ui/selmenu.cpp
+++ b/src/frontend/mame/ui/selmenu.cpp
@@ -2384,28 +2384,29 @@ bool menu_select_launch::has_multiple_bios(game_driver const &driver, s_bios &bi
if (!driver.rom)
return false;
- auto const entries = rom_build_entries(driver.rom);
-
- std::string default_name;
- for (const rom_entry &rom : entries)
- if (ROMENTRY_ISDEFAULT_BIOS(&rom))
- default_name = ROM_GETNAME(&rom);
+ char const *default_name(nullptr);
+ for (tiny_rom_entry const *rom = driver.rom; !ROMENTRY_ISEND(rom); ++rom)
+ {
+ if (ROMENTRY_ISDEFAULT_BIOS(rom))
+ default_name = rom->name;
+ }
- for (const rom_entry &rom : entries)
+ for (tiny_rom_entry const *rom = driver.rom; !ROMENTRY_ISEND(rom); ++rom)
{
- if (ROMENTRY_ISSYSTEM_BIOS(&rom))
+ if (ROMENTRY_ISSYSTEM_BIOS(rom))
{
- std::string name(ROM_GETHASHDATA(&rom));
- std::string bname(ROM_GETNAME(&rom));
- int bios_flags = ROM_GETBIOSFLAGS(&rom);
+ std::string name(rom->hashdata);
+ u32 const bios_flags(ROM_GETBIOSFLAGS(rom));
- if (bname == default_name)
+ if (default_name && !std::strcmp(rom->name, default_name))
{
name.append(_(" (default)"));
- biosname.emplace(biosname.begin(), name, bios_flags - 1);
+ biosname.emplace(biosname.begin(), std::move(name), bios_flags - 1);
}
else
- biosname.emplace_back(name, bios_flags - 1);
+ {
+ biosname.emplace_back(std::move(name), bios_flags - 1);
+ }
}
}
return biosname.size() > 1U;