mirror of
https://github.com/holub/mame
synced 2025-05-10 16:21:42 +03:00
MT04267: Fix -verifyroms to not consider NO_DUMP ROMs as matches to the parent.
This commit is contained in:
parent
92d1d14efc
commit
af6c7a9dac
@ -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))
|
if (!hashes.flag(hash_collection::FLAG_NO_DUMP))
|
||||||
{
|
{
|
||||||
anyrequired = TRUE;
|
anyrequired = TRUE;
|
||||||
|
|
||||||
if (allshared && !rom_used_by_parent(gamedrv, hashes, NULL))
|
if (allshared && !rom_used_by_parent(gamedrv, hashes, NULL))
|
||||||
allshared = FALSE;
|
allshared = FALSE;
|
||||||
}
|
}
|
||||||
@ -512,12 +511,15 @@ 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 (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 (region = rom_first_region(*source); region; region = rom_next_region(region))
|
||||||
for (rom = rom_first_file(region); rom; rom = rom_next_file(rom))
|
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)
|
if (parent != NULL)
|
||||||
*parent = drv;
|
*parent = drv;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -209,11 +209,13 @@ int cli_execute(cli_options &options, osd_interface &osd, int argc, char **argv)
|
|||||||
// handle exceptions of various types
|
// handle exceptions of various types
|
||||||
catch (emu_fatalerror &fatal)
|
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;
|
result = (fatal.exitcode() != 0) ? fatal.exitcode() : MAMERR_FATALERROR;
|
||||||
|
|
||||||
// for any unknown game, offer some suggestions
|
// if a game was specified, wasn't a wildcard, and our error indicates this was the
|
||||||
if (result == MAMERR_NO_SUCH_GAME && strlen(options.system_name()) > 0 && strchr(options.system_name(), '*') == NULL)
|
// 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());
|
display_suggestions(options.system_name());
|
||||||
}
|
}
|
||||||
catch (emu_exception &)
|
catch (emu_exception &)
|
||||||
|
Loading…
Reference in New Issue
Block a user