diff options
author | 2017-04-02 18:57:02 -0400 | |
---|---|---|
committer | 2017-04-06 11:20:45 +1000 | |
commit | fbb7d927d3a58de18850ad3079621e0a78e5e6bd (patch) | |
tree | 81616193556f6466a00d2c05142d1ba89b9cc693 /src/emu/emupal.cpp | |
parent | 694a7812155927f89df046b585836ce872929e72 (diff) |
Refactoring in response to MT#6531
Prior to this change, options for images and slots were stored in the emu_options collection. Anything that might restart the emulation (such as slot changes and images that reset on load) had to manipulate the emu_options structure directly. The dynamic nature of images and slots meant that some elaborate conventions for setting up this collection had to be understood by clients.
After this change, emu_options has two new members (image_options and slot_options) that expose image and slot selections via an std::map. Anything that changes images or slots in a fashion that needs to persist across sessions needs to modify these data structures. Additionally, some of the hairly logic (e.g. - get_default_card_software) now records its data here rather than trying to subvert the core_options system.
This is how MT#6531 was fixed; now when diimage.cpp sees an image that resets on load, it just modifies the image_options structure and forces a reset. This allowed some further cleanups to happen within diimage.
This should be considered a very risky change, and scrutiny/feedback is welcome. In particular, there seems to be functionality surrounding device bioses that I'm not 100% sure how it works; the syntax seems to imply that it only works on slot devices.
Diffstat (limited to 'src/emu/emupal.cpp')
0 files changed, 0 insertions, 0 deletions