mirror of
https://github.com/holub/mame
synced 2025-04-30 03:47:13 +03:00
Have the -romident command skip the matching process and issue an error message when no files are found
This commit is contained in:
parent
4b4cfed14d
commit
dfd0305ca3
@ -1452,7 +1452,9 @@ void cli_frontend::romident(const std::vector<std::string> &args)
|
|||||||
ident.identify(filename);
|
ident.identify(filename);
|
||||||
|
|
||||||
// return the appropriate error code
|
// return the appropriate error code
|
||||||
if (ident.matches() == ident.total())
|
if (ident.total() == 0)
|
||||||
|
throw emu_fatalerror(EMU_ERR_MISSING_FILES, "No files found.\n");
|
||||||
|
else if (ident.matches() == ident.total())
|
||||||
return;
|
return;
|
||||||
else if (ident.matches() == ident.total() - ident.nonroms())
|
else if (ident.matches() == ident.total() - ident.nonroms())
|
||||||
throw emu_fatalerror(EMU_ERR_IDENT_NONROMS, "Out of %d files, %d matched, %d are not roms.\n", ident.total(), ident.matches(), ident.nonroms());
|
throw emu_fatalerror(EMU_ERR_IDENT_NONROMS, "Out of %d files, %d matched, %d are not roms.\n", ident.total(), ident.matches(), ident.nonroms());
|
||||||
|
@ -332,6 +332,9 @@ void media_identifier::digest_data(std::vector<file_info> &info, char const *nam
|
|||||||
|
|
||||||
void media_identifier::match_hashes(std::vector<file_info> &info)
|
void media_identifier::match_hashes(std::vector<file_info> &info)
|
||||||
{
|
{
|
||||||
|
if (info.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
auto match_device =
|
auto match_device =
|
||||||
[&info, listnames = std::unordered_set<std::string>()] (device_t &device) mutable
|
[&info, listnames = std::unordered_set<std::string>()] (device_t &device) mutable
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user