diff options
author | 2021-07-15 04:09:18 +1000 | |
---|---|---|
committer | 2021-07-15 13:54:40 +1000 | |
commit | 37157461313b13a691722b83c87df8d2315457da (patch) | |
tree | 8034c6f33776f5a8bfc8f6c69af879975061bd0a /src/emu/network.cpp | |
parent | 66554d3b84f5fec60dcf5d896283a1a04487c0e0 (diff) |
API cleanups and miscellaneous fixes.
emu/ioport.cpp: Allow controller files to override input sequences for
inputs that don't use defaults, and to override the toggle setting for
digital inputs.
emu/config.cpp: Expose configuration level (mostly matters for
controller files), improved verbose diagnostic messages, and moved a few
things out of the global and preprocessor namespaces.
docs: Added documentation for some controller configuration file
features. The device mapping feature documentation will be merged in at
some point.
util/unicode.cpp, emu/input.cpp: API cleanups.
Diffstat (limited to 'src/emu/network.cpp')
-rw-r--r-- | src/emu/network.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/emu/network.cpp b/src/emu/network.cpp index 92ac826e9d8..68c9f93c196 100644 --- a/src/emu/network.cpp +++ b/src/emu/network.cpp @@ -26,7 +26,10 @@ network_manager::network_manager(running_machine &machine) : m_machine(machine) { - machine.configuration().config_register("network", config_load_delegate(&network_manager::config_load, this), config_save_delegate(&network_manager::config_save, this)); + machine.configuration().config_register( + "network", + configuration_manager::load_delegate(&network_manager::config_load, this), + configuration_manager::save_delegate(&network_manager::config_save, this)); } //------------------------------------------------- @@ -34,9 +37,9 @@ network_manager::network_manager(running_machine &machine) // configuration file //------------------------------------------------- -void network_manager::config_load(config_type cfg_type, util::xml::data_node const *parentnode) +void network_manager::config_load(config_type cfg_type, config_level cfg_level, util::xml::data_node const *parentnode) { - if ((cfg_type == config_type::GAME) && (parentnode != nullptr)) + if ((cfg_type == config_type::SYSTEM) && parentnode) { for (util::xml::data_node const *node = parentnode->get_child("device"); node; node = node->get_next_sibling("device")) { @@ -71,13 +74,13 @@ void network_manager::config_load(config_type cfg_type, util::xml::data_node con void network_manager::config_save(config_type cfg_type, util::xml::data_node *parentnode) { - /* only care about game-specific data */ - if (cfg_type == config_type::GAME) + // only save about system-specific data + if (cfg_type == config_type::SYSTEM) { for (device_network_interface &network : network_interface_enumerator(machine().root_device())) { util::xml::data_node *const node = parentnode->add_child("device", nullptr); - if (node != nullptr) + if (node) { node->set_attribute("tag", network.device().tag()); node->set_attribute_int("interface", network.get_interface()); |