diff options
author | 2009-04-11 08:46:54 +0000 | |
---|---|---|
committer | 2009-04-11 08:46:54 +0000 | |
commit | 55bb21fcbc261d2048b8ec79c764cecec7439143 (patch) | |
tree | 67d1c4c250aabd8fdfbf9c938b18fbbd80d5432a /src/emu | |
parent | cd0992c812148c3e8934a8f3b616a726db98b600 (diff) |
audit still passes for romsets with no dumped/required roms, but returns NOT FOUND if everything else is not found.
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/audit.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/emu/audit.c b/src/emu/audit.c index 9eab5b7764f..e4ccfe1e6b5 100644 --- a/src/emu/audit.c +++ b/src/emu/audit.c @@ -228,11 +228,26 @@ int audit_summary(const game_driver *gamedrv, int count, const audit_record *rec { int overall_status = CORRECT; int recnum; + int anyfound = 0; + int required = 0; - /* no count AND no records means not found, no count only means no ROMs required (= correct) */ + /* no count AND no records means not found */ if (count == 0 && records == NULL) return NOTFOUND; + for (recnum = 0; recnum < count; recnum++) + { + const audit_record *record = &records[recnum]; + + if (record->status != AUDIT_STATUS_NOT_FOUND) + anyfound = 1; + else if (record->substatus != SUBSTATUS_NOT_FOUND_NODUMP && record->substatus != SUBSTATUS_NOT_FOUND_OPTIONAL) + required = 1; + } + + if (!anyfound && required) + return NOTFOUND; + /* loop over records */ for (recnum = 0; recnum < count; recnum++) { |