MT04267: Fix -verifyroms to not consider NO_DUMP ROMs as matches to the parent.

This commit is contained in:
Aaron Giles 2011-03-03 17:39:43 +00:00
parent 92d1d14efc
commit af6c7a9dac
2 changed files with 9 additions and 5 deletions

View File

@ -80,7 +80,6 @@ int audit_images(emu_options &options, const game_driver *gamedrv, const char *v
if (!hashes.flag(hash_collection::FLAG_NO_DUMP))
{
anyrequired = TRUE;
if (allshared && !rom_used_by_parent(gamedrv, hashes, NULL))
allshared = FALSE;
}
@ -512,13 +511,16 @@ static int rom_used_by_parent(const game_driver *gamedrv, const hash_collection
for (const rom_source *source = rom_first_source(config); source != NULL; source = rom_next_source(*source))
for (region = rom_first_region(*source); region; region = rom_next_region(region))
for (rom = rom_first_file(region); rom; rom = rom_next_file(rom))
if (hash_collection(ROM_GETHASHDATA(rom)) == romhashes)
{
hash_collection hashes(ROM_GETHASHDATA(rom));
if (!hashes.flag(hash_collection::FLAG_NO_DUMP) && hashes == romhashes)
{
if (parent != NULL)
*parent = drv;
return TRUE;
}
}
}
return FALSE;
}

View File

@ -209,11 +209,13 @@ int cli_execute(cli_options &options, osd_interface &osd, int argc, char **argv)
// handle exceptions of various types
catch (emu_fatalerror &fatal)
{
fprintf(stderr, "%s\n", fatal.string());
astring string(fatal.string());
fprintf(stderr, "%s\n", string.trimspace().cstr());
result = (fatal.exitcode() != 0) ? fatal.exitcode() : MAMERR_FATALERROR;
// for any unknown game, offer some suggestions
if (result == MAMERR_NO_SUCH_GAME && strlen(options.system_name()) > 0 && strchr(options.system_name(), '*') == NULL)
// if a game was specified, wasn't a wildcard, and our error indicates this was the
// reason for failure, offer some suggestions
if (result == MAMERR_NO_SUCH_GAME && strlen(options.system_name()) > 0 && strchr(options.system_name(), '*') == NULL && options.system() == NULL)
display_suggestions(options.system_name());
}
catch (emu_exception &)