summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/selsoft.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-02-15 23:32:05 +1100
committer Vas Crabb <vas@vastheman.com>2021-02-15 23:32:05 +1100
commit0ba1d1db35e4b8370d58bdbe0a009cc7d9f28466 (patch)
treea66436bd0f0e1cfb5e4d1fc2605aee08be841011 /src/frontend/mame/ui/selsoft.cpp
parent13017e5de1b33b6db88ca94c81e4eb0e63d6d535 (diff)
frontend/ui: Improved messages displayed when files are missing.
* Only show things preventing launch in UI (not NO_DUMP, optional, etc.) * Don't show details like file lengths and checksums in UI * Actually do system audit when launching from favourites * Log the more detailed summary at info level
Diffstat (limited to 'src/frontend/mame/ui/selsoft.cpp')
-rw-r--r--src/frontend/mame/ui/selsoft.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/frontend/mame/ui/selsoft.cpp b/src/frontend/mame/ui/selsoft.cpp
index 4cb7d2b0ef3..17d2461b20c 100644
--- a/src/frontend/mame/ui/selsoft.cpp
+++ b/src/frontend/mame/ui/selsoft.cpp
@@ -16,7 +16,6 @@
#include "ui/inifile.h"
#include "ui/selector.h"
-#include "audit.h"
#include "corestr.h"
#include "drivenum.h"
#include "emuopts.h"
@@ -475,9 +474,9 @@ void menu_select_software::inkey_select(const event *menu_event)
// audit the system ROMs first to see if we're going to work
media_auditor::summary const sysaudit = auditor.audit_media(AUDIT_VALIDATE_FAST);
- if (sysaudit != media_auditor::CORRECT && sysaudit != media_auditor::BEST_AVAILABLE && sysaudit != media_auditor::NONE_NEEDED)
+ if (!audit_passed(sysaudit))
{
- set_error(reset_options::REMEMBER_REF, make_audit_fail_text(media_auditor::NOTFOUND != sysaudit, auditor));
+ set_error(reset_options::REMEMBER_REF, make_system_audit_fail_text(auditor, sysaudit));
}
else if (ui_swinfo->startempty == 1)
{
@@ -489,13 +488,12 @@ void menu_select_software::inkey_select(const event *menu_event)
}
else
{
- // first audit the software
+ // now audit the software
software_list_device *swlist = software_list_device::find_by_name(*drivlist.config(), ui_swinfo->listname);
const software_info *swinfo = swlist->find(ui_swinfo->shortname);
-
media_auditor::summary const swaudit = auditor.audit_software(*swlist, *swinfo, AUDIT_VALIDATE_FAST);
- if (swaudit == media_auditor::CORRECT || swaudit == media_auditor::BEST_AVAILABLE || swaudit == media_auditor::NONE_NEEDED)
+ if (audit_passed(swaudit))
{
if (!select_bios(*ui_swinfo, false) && !select_part(*swinfo, *ui_swinfo))
{
@@ -506,15 +504,7 @@ void menu_select_software::inkey_select(const event *menu_event)
else
{
// otherwise, display an error
- std::ostringstream str;
- str << _("The selected software is missing one or more required files. Please select a different software item.\n\n");
- if (media_auditor::NOTFOUND != swaudit)
- {
- auditor.summarize(nullptr, &str);
- str << '\n';
- }
- str << _("Press any key to continue."),
- set_error(reset_options::REMEMBER_POSITION, str.str());
+ set_error(reset_options::REMEMBER_REF, make_software_audit_fail_text(auditor, swaudit));
}
}
}