diff options
author | npwoods <npwoods@alumni.carnegiemellon.edu> | 2017-04-19 08:19:17 -0400 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2017-04-19 14:19:17 +0200 |
commit | fb7dd27728dcb62904a8f76615501d451107eb69 (patch) | |
tree | a3cefaecb7ff956aab251ace8a31da87b2a47abc /src/emu | |
parent | 43b76a8a2fda92e393988a42500c14ca04de17fc (diff) |
Fixed an issue where reset_on_load images would not properly persist across emulation sessions (#2244)
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/image.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/emu/image.cpp b/src/emu/image.cpp index a8548fca75d..590130bd900 100644 --- a/src/emu/image.cpp +++ b/src/emu/image.cpp @@ -177,18 +177,23 @@ void image_manager::options_extract() { for (device_image_interface &image : image_interface_iterator(machine().root_device())) { - // we have to assemble the image option differently for software lists and for normal images - std::string image_opt; - if (image.exists()) + // only perform this activity for devices where is_reset_on_load() is false; for devices + // where this is true, manipulation of this value is done in reset_and_load() + if (!image.is_reset_on_load()) { - if (image.loaded_through_softlist()) - image_opt = util::string_format("%s:%s:%s", image.software_list_name(), image.full_software_name(), image.brief_instance_name()); - else - image_opt = image.filename(); - } + // we have to assemble the image option differently for software lists and for normal images + std::string image_opt; + if (image.exists()) + { + if (image.loaded_through_softlist()) + image_opt = util::string_format("%s:%s:%s", image.software_list_name(), image.full_software_name(), image.brief_instance_name()); + else + image_opt = image.filename(); + } - // and set the option - machine().options().image_options()[image.instance_name()] = std::move(image_opt); + // and set the option + machine().options().image_options()[image.instance_name()] = std::move(image_opt); + } } // write the config, if appropriate |