diff options
author | Vas Crabb <vas@vastheman.com> | 2022-12-22 20:04:52 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2022-12-22 20:04:52 +1100 |
commit | 8edb88dbaab9efbc0b1d843656fecc4b0f087df3 (patch) | |
tree | 14aa9ed57a649807bbdcfd0860f2b900b80ac835 /src/frontend/mame/ui | |
parent | a88b7def11e03a7df0263842e69087546411313c (diff) |
C++ guidelins update and cleanup:
docs: Expanded C++ guidelines following suggestions by P. Mackinlay.
ui/inifile.cpp: Got rid of the check for "arcade" systems - it broke
managing favourites for the slotted Neo Geo.
luaengine.cpp: Removed the "type" property from system driver metadata.
It's effectively deprecated.
bus/vme/vme_fcisio.cpp, commodore/mps1230.cpp: Fixed inappropriate use
of machine type flag constants.
megadriv.xml: Made notes about the two Galaxy Force 2 sets more explcit.
Diffstat (limited to 'src/frontend/mame/ui')
-rw-r--r-- | src/frontend/mame/ui/inifile.cpp | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/src/frontend/mame/ui/inifile.cpp b/src/frontend/mame/ui/inifile.cpp index c4217f93fa3..e25f00da4a1 100644 --- a/src/frontend/mame/ui/inifile.cpp +++ b/src/frontend/mame/ui/inifile.cpp @@ -488,31 +488,23 @@ void favorite_manager::apply_running_machine(running_machine &machine, T &&actio { bool done(false); - // TODO: this should be changed - it interacts poorly with cartslots on arcade systems - if ((machine.system().flags & machine_flags::MASK_TYPE) == machine_flags::TYPE_ARCADE) + bool have_software(false); + for (device_image_interface &image_dev : image_interface_enumerator(machine.root_device())) { - action(machine.system(), nullptr, nullptr, done); - } - else - { - bool have_software(false); - for (device_image_interface &image_dev : image_interface_enumerator(machine.root_device())) + software_info const *const sw(image_dev.software_entry()); + if (image_dev.exists() && image_dev.loaded_through_softlist() && sw) { - software_info const *const sw(image_dev.software_entry()); - if (image_dev.exists() && image_dev.loaded_through_softlist() && sw) - { - assert(image_dev.software_list_name()); + assert(image_dev.software_list_name()); - have_software = true; - action(machine.system(), &image_dev, sw, done); - if (done) - return; - } + have_software = true; + action(machine.system(), &image_dev, sw, done); + if (done) + return; } - - if (!have_software) - action(machine.system(), nullptr, nullptr, done); } + + if (!have_software) + action(machine.system(), nullptr, nullptr, done); } void favorite_manager::update_sorted() |