mirror of
https://github.com/holub/mame
synced 2025-06-25 13:54:37 +03:00
check device roms only once as well when using -romident. this does not help
as much as the softlist change, but there was no reason to keep the old unoptimal behavior. nw.
This commit is contained in:
parent
1c9dd20020
commit
82bc54fb61
@ -1882,6 +1882,7 @@ int media_identifier::find_by_hash(const hash_collection &hashes, int length)
|
|||||||
{
|
{
|
||||||
int found = 0;
|
int found = 0;
|
||||||
slname_map listnames;
|
slname_map listnames;
|
||||||
|
slname_map shortnames;
|
||||||
|
|
||||||
// iterate over drivers
|
// iterate over drivers
|
||||||
m_drivlist.reset();
|
m_drivlist.reset();
|
||||||
@ -1890,6 +1891,9 @@ int media_identifier::find_by_hash(const hash_collection &hashes, int length)
|
|||||||
// iterate over devices, regions and files within the region */
|
// iterate over devices, regions and files within the region */
|
||||||
device_iterator deviter(m_drivlist.config().root_device());
|
device_iterator deviter(m_drivlist.config().root_device());
|
||||||
for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
|
for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
|
||||||
|
{
|
||||||
|
if (shortnames.add(device->shortname(), 0, FALSE) != TMERR_DUPLICATE)
|
||||||
|
{
|
||||||
for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
|
for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
|
||||||
for (const rom_entry *rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
|
for (const rom_entry *rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
|
||||||
{
|
{
|
||||||
@ -1905,6 +1909,8 @@ int media_identifier::find_by_hash(const hash_collection &hashes, int length)
|
|||||||
found++;
|
found++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// next iterate over softlists
|
// next iterate over softlists
|
||||||
software_list_device_iterator iter(m_drivlist.config().root_device());
|
software_list_device_iterator iter(m_drivlist.config().root_device());
|
||||||
|
Loading…
Reference in New Issue
Block a user