diff options
author | 2022-12-22 20:04:52 +1100 | |
---|---|---|
committer | 2022-12-22 20:04:52 +1100 | |
commit | 8edb88dbaab9efbc0b1d843656fecc4b0f087df3 (patch) | |
tree | 14aa9ed57a649807bbdcfd0860f2b900b80ac835 /src | |
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')
-rw-r--r-- | src/devices/bus/vme/vme_fcisio.cpp | 2 | ||||
-rw-r--r-- | src/frontend/mame/luaengine.cpp | 23 | ||||
-rw-r--r-- | src/frontend/mame/ui/inifile.cpp | 32 | ||||
-rw-r--r-- | src/mame/commodore/mps1230.cpp | 4 |
4 files changed, 15 insertions, 46 deletions
diff --git a/src/devices/bus/vme/vme_fcisio.cpp b/src/devices/bus/vme/vme_fcisio.cpp index 9003384ce4d..8d50a671cc0 100644 --- a/src/devices/bus/vme/vme_fcisio.cpp +++ b/src/devices/bus/vme/vme_fcisio.cpp @@ -461,4 +461,4 @@ uint8_t vme_fcisio1_card_device::config_rd(){ // This info isn't kept in a card driver atm so storing it as a comment for later use // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -//COMP( 1986, fcisio1, 0, 0, fcisio1, fcisio1, driver_device, 0, "Force Computers Gmbh", "SYS68K/ISIO-1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_TYPE_COMPUTER ) +//COMP( 1986, fcisio1, 0, 0, fcisio1, fcisio1, driver_device, 0, "Force Computers Gmbh", "SYS68K/ISIO-1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW ) diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index d406a502583..1cb4b2dff44 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -1315,29 +1315,6 @@ void lua_engine::initialize() } return rot; }); - game_driver_type["type"] = sol::property( - [] (game_driver const &driver) - { - // FIXME: this shouldn't be called type - there's potendial for confusion with the device type - // also, this should eventually go away in favour of richer flags - std::string type; - switch (driver.flags & machine_flags::MASK_TYPE) - { - case machine_flags::TYPE_ARCADE: - type = "arcade"; - break; - case machine_flags::TYPE_CONSOLE: - type = "console"; - break; - case machine_flags::TYPE_COMPUTER: - type = "computer"; - break; - default: - type = "other"; - break; - } - return type; - }); game_driver_type["not_working"] = sol::property([] (game_driver const &driver) { return (driver.flags & machine_flags::NOT_WORKING) != 0; }); game_driver_type["supports_save"] = sol::property([] (game_driver const &driver) { return (driver.flags & machine_flags::SUPPORTS_SAVE) != 0; }); game_driver_type["no_cocktail"] = sol::property([] (game_driver const &driver) { return (driver.flags & machine_flags::NO_COCKTAIL) != 0; }); 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() diff --git a/src/mame/commodore/mps1230.cpp b/src/mame/commodore/mps1230.cpp index 425d93fa6e9..8020dfe26f2 100644 --- a/src/mame/commodore/mps1230.cpp +++ b/src/mame/commodore/mps1230.cpp @@ -173,5 +173,5 @@ ROM_START(mps1230) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ -COMP( 1986, mps1000, 0, 0, mps1000, mps1230, mps1230_state, empty_init, "Commodore Business Machines", "MPS-1000 Printer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_TYPE_OTHER ) -COMP( 1988, mps1230, 0, 0, mps1230, mps1230, mps1230_state, empty_init, "Commodore Business Machines", "MPS-1230 NLQ Printer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_TYPE_OTHER ) +SYST( 1986, mps1000, 0, 0, mps1000, mps1230, mps1230_state, empty_init, "Commodore Business Machines", "MPS-1000 Printer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW ) +SYST( 1988, mps1230, 0, 0, mps1230, mps1230, mps1230_state, empty_init, "Commodore Business Machines", "MPS-1230 NLQ Printer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW ) |