From 9c8da09e53e23a0d9cabc9e5c847ba95db409b36 Mon Sep 17 00:00:00 2001 From: smf- Date: Sat, 11 Apr 2009 09:05:12 +0000 Subject: [PATCH] change to last patch to only treat a file as found if it's not from a parent. --- src/emu/audit.c | 11 +++++++---- src/emu/audit.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/emu/audit.c b/src/emu/audit.c index e4ccfe1e6b5..51b58da7c2f 100644 --- a/src/emu/audit.c +++ b/src/emu/audit.c @@ -240,7 +240,10 @@ int audit_summary(const game_driver *gamedrv, int count, const audit_record *rec const audit_record *record = &records[recnum]; if (record->status != AUDIT_STATUS_NOT_FOUND) - anyfound = 1; + { + if (!record->used_by_parent) + anyfound = 1; + } else if (record->substatus != SUBSTATUS_NOT_FOUND_NODUMP && record->substatus != SUBSTATUS_NOT_FOUND_OPTIONAL) required = 1; } @@ -340,6 +343,7 @@ int audit_summary(const game_driver *gamedrv, int count, const audit_record *rec static int audit_one_rom(core_options *options, const rom_entry *rom, const char *regiontag, const game_driver *gamedrv, UINT32 validation, audit_record *record) { const game_driver *drv; + const game_driver *parent; UINT32 crc = 0; UINT8 crcs[4]; int has_crc; @@ -350,6 +354,7 @@ static int audit_one_rom(core_options *options, const rom_entry *rom, const char record->exphash = ROM_GETHASHDATA(rom); record->length = 0; record->explength = rom_file_size(rom); + record->used_by_parent = rom_used_by_parent(gamedrv, rom, &parent); /* see if we have a CRC and extract it if so */ has_crc = hash_data_extract_binary_checksum(record->exphash, HASH_CRC, crcs); @@ -408,8 +413,6 @@ static int audit_one_rom(core_options *options, const rom_entry *rom, const char /* if we failed to find the file, set the appropriate status */ if (record->length == 0) { - const game_driver *parent; - /* no good dump */ if (hash_data_has_info(record->exphash, HASH_INFO_NO_DUMP)) set_status(record, AUDIT_STATUS_NOT_FOUND, SUBSTATUS_NOT_FOUND_NODUMP); @@ -419,7 +422,7 @@ static int audit_one_rom(core_options *options, const rom_entry *rom, const char set_status(record, AUDIT_STATUS_NOT_FOUND, SUBSTATUS_NOT_FOUND_OPTIONAL); /* not found and used by parent */ - else if (rom_used_by_parent(gamedrv, rom, &parent)) + else if (record->used_by_parent) set_status(record, AUDIT_STATUS_NOT_FOUND, (parent->flags & GAME_IS_BIOS_ROOT) ? SUBSTATUS_NOT_FOUND_BIOS : SUBSTATUS_NOT_FOUND_PARENT); /* just plain old not found */ diff --git a/src/emu/audit.h b/src/emu/audit.h index 4aeda17ca9d..1be58f1e56f 100644 --- a/src/emu/audit.h +++ b/src/emu/audit.h @@ -86,6 +86,7 @@ struct _audit_record UINT32 length; /* actual length of item */ const char * exphash; /* expected hash data */ char hash[HASH_BUF_SIZE]; /* actual hash information */ + UINT8 used_by_parent; /* is the rom from a parent */ };