diff options
| author | 2017-06-26 08:47:48 -0400 | |
|---|---|---|
| committer | 2017-06-27 16:20:45 +1000 | |
| commit | ad3191cdd3cd100bc376fb7daec0ea1508211350 (patch) | |
| tree | e9c13377033fdfb82c6152b2a6718e87d9744376 /src | |
| parent | f05751e2833471af303d58b77212afd75e754c17 (diff) | |
Fixed issue loading reset_on_load() images (#2414)
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/diimage.cpp | 6 | ||||
| -rw-r--r-- | src/emu/diimage.h | 3 | ||||
| -rw-r--r-- | src/emu/image.cpp | 7 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp index fc321185219..92e09ecdbbb 100644 --- a/src/emu/diimage.cpp +++ b/src/emu/diimage.cpp @@ -96,7 +96,8 @@ device_image_interface::device_image_interface(const machine_config &mconfig, de m_create_format(0), m_create_args(nullptr), m_user_loadable(true), - m_is_loading(false) + m_is_loading(false), + m_is_reset_and_loading(false) { } @@ -1218,6 +1219,9 @@ void device_image_interface::reset_and_load(const std::string &path) // and record the new load device().machine().options().image_option(instance_name()).specify(path); + + // record that we're reset and loading + m_is_reset_and_loading = true; } diff --git a/src/emu/diimage.h b/src/emu/diimage.h index c6d3d977caa..68b6c8a96ae 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -239,6 +239,7 @@ public: } bool user_loadable() const { return m_user_loadable; } + bool is_reset_and_loading() const { return m_is_reset_and_loading; } const std::string &full_software_name() const { return m_full_software_name; } protected: @@ -339,6 +340,8 @@ private: bool m_user_loadable; bool m_is_loading; + + bool m_is_reset_and_loading; }; // iterator diff --git a/src/emu/image.cpp b/src/emu/image.cpp index dc005578883..8d2ccfb5824 100644 --- a/src/emu/image.cpp +++ b/src/emu/image.cpp @@ -189,9 +189,12 @@ void image_manager::options_extract() // is true forces a reset, hence the name) // // 2. When is_reset_on_load(), and this results in a device being unmounted (unmounting is_reset_and_load() - // doesn't force an unmount) + // doesn't force an unmount). + // + // Note that as a part of #2, we cannot extract the option when the image in question is a part of an + // active reset_on_load; hence the check for is_reset_and_loading() (see issue #2414) if (!image.is_reset_on_load() - || (!image.exists() && !machine().options().image_option(image.instance_name()).value().empty())) + || (!image.exists() && !image.is_reset_and_loading() && !machine().options().image_option(image.instance_name()).value().empty())) { // we have to assemble the image option differently for software lists and for normal images std::string image_opt; |
