summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/info.cpp
diff options
context:
space:
mode:
author npwoods <npwoods@alumni.carnegiemellon.edu>2017-04-18 06:26:21 -0400
committer Olivier Galibert <galibert@pobox.com>2017-04-18 12:26:21 +0200
commit1fb6d8a3c51464714793a34ca1092208bd2e2287 (patch)
treef92088febaab997940bbdcf2772747496d949432 /src/frontend/mame/ui/info.cpp
parent699673f892b9ea9f56fcbca9054a00395841b7bf (diff)
Fixed a regression in the mandatory image check (#2243)
As a consequence of recent changes, we were not properly blocking the emulation from starting when a must_be_loaded() image had an unspecified image.
Diffstat (limited to 'src/frontend/mame/ui/info.cpp')
-rw-r--r--src/frontend/mame/ui/info.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp
index 670042de0f5..8101faad3c6 100644
--- a/src/frontend/mame/ui/info.cpp
+++ b/src/frontend/mame/ui/info.cpp
@@ -319,12 +319,23 @@ std::string machine_info::game_info_string()
std::string machine_info::mandatory_images()
{
std::ostringstream buf;
+ bool is_first = true;
// make sure that any required image has a mounted file
for (device_image_interface &image : image_interface_iterator(m_machine.root_device()))
{
- if (image.must_be_loaded() && m_machine.options().image_options().count(image.instance_name()) == 0)
- buf << "\"" << image.instance_name() << "\", ";
+ if (image.must_be_loaded())
+ {
+ auto iter = m_machine.options().image_options().find(image.instance_name());
+ if (iter == m_machine.options().image_options().end() || iter->second.empty())
+ {
+ if (is_first)
+ is_first = false;
+ else
+ buf << ", ";
+ buf << "\"" << image.instance_name() << "\"";
+ }
+ }
}
return buf.str();
}