audit.c: Fixed software list chd verification. [qmc2]

This commit is contained in:
Wilbert Pol 2013-05-22 18:18:23 +00:00
parent 0353e202c0
commit b06a8e7c22
2 changed files with 6 additions and 4 deletions

View File

@ -218,8 +218,10 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, soft
m_validation = validation; m_validation = validation;
astring combinedpath(swinfo->shortname, ";", list_name, PATH_SEPARATOR, swinfo->shortname); astring combinedpath(swinfo->shortname, ";", list_name, PATH_SEPARATOR, swinfo->shortname);
astring locationtag(list_name, "%", swinfo->shortname, "%");
if ( swinfo->parentname ) if ( swinfo->parentname )
{ {
locationtag.cat(swinfo->parentname);
combinedpath.cat(";").cat(swinfo->parentname).cat(";").cat(list_name).cat(PATH_SEPARATOR).cat(swinfo->parentname); combinedpath.cat(";").cat(swinfo->parentname).cat(";").cat(list_name).cat(PATH_SEPARATOR).cat(swinfo->parentname);
} }
m_searchpath = combinedpath; m_searchpath = combinedpath;
@ -253,7 +255,7 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, soft
// audit a disk // audit a disk
else if (ROMREGION_ISDISKDATA(region)) else if (ROMREGION_ISDISKDATA(region))
{ {
record = audit_one_disk(rom); record = audit_one_disk(rom, (const char *)locationtag);
} }
// count the number of files that are found. // count the number of files that are found.
@ -476,14 +478,14 @@ audit_record *media_auditor::audit_one_rom(const rom_entry *rom)
// audit_one_disk - validate a single disk entry // audit_one_disk - validate a single disk entry
//------------------------------------------------- //-------------------------------------------------
audit_record *media_auditor::audit_one_disk(const rom_entry *rom) audit_record *media_auditor::audit_one_disk(const rom_entry *rom, const char *locationtag)
{ {
// allocate and append a new record // allocate and append a new record
audit_record &record = m_record_list.append(*global_alloc(audit_record(*rom, audit_record::MEDIA_DISK))); audit_record &record = m_record_list.append(*global_alloc(audit_record(*rom, audit_record::MEDIA_DISK)));
// open the disk // open the disk
chd_file source; chd_file source;
chd_error err = chd_error(open_disk_image(m_enumerator.options(), &m_enumerator.driver(), rom, source, NULL)); chd_error err = chd_error(open_disk_image(m_enumerator.options(), &m_enumerator.driver(), rom, source, locationtag));
// if we succeeded, get the hashes // if we succeeded, get the hashes
if (err == CHDERR_NONE) if (err == CHDERR_NONE)

View File

@ -183,7 +183,7 @@ public:
private: private:
// internal helpers // internal helpers
audit_record *audit_one_rom(const rom_entry *rom); audit_record *audit_one_rom(const rom_entry *rom);
audit_record *audit_one_disk(const rom_entry *rom); audit_record *audit_one_disk(const rom_entry *rom, const char *locationtag = NULL);
void compute_status(audit_record &record, const rom_entry *rom, bool found); void compute_status(audit_record &record, const rom_entry *rom, bool found);
device_t *find_shared_device(device_t &device, const char *name, const hash_collection &romhashes, UINT64 romlength); device_t *find_shared_device(device_t &device, const char *name, const hash_collection &romhashes, UINT64 romlength);