mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
Cleanup/bulletproofing to the issue Wizz just found
This commit is contained in:
parent
769c2af968
commit
281223e497
@ -200,15 +200,12 @@ void image_manager::options_extract()
|
|||||||
std::string image_opt;
|
std::string image_opt;
|
||||||
if (image.exists())
|
if (image.exists())
|
||||||
{
|
{
|
||||||
if (image.loaded_through_softlist())
|
if (!image.loaded_through_softlist())
|
||||||
{
|
|
||||||
image_opt = util::string_format("%s:%s", image.software_list_name(), image.full_software_name());
|
|
||||||
const software_part *tmp = image.part_entry();
|
|
||||||
if (!tmp->name().empty())
|
|
||||||
image_opt.append(":").append(tmp->name());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
image_opt = image.filename();
|
image_opt = image.filename();
|
||||||
|
else if (image.part_entry() && !image.part_entry()->name().empty())
|
||||||
|
image_opt = util::string_format("%s:%s:%s", image.software_list_name(), image.full_software_name(), image.part_entry()->name());
|
||||||
|
else
|
||||||
|
image_opt = util::string_format("%s:%s", image.software_list_name(), image.full_software_name());
|
||||||
}
|
}
|
||||||
|
|
||||||
// and set the option (provided that it hasn't been removed out from under us)
|
// and set the option (provided that it hasn't been removed out from under us)
|
||||||
|
Loading…
Reference in New Issue
Block a user