summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/laserdsc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/laserdsc.cpp')
-rw-r--r--src/devices/machine/laserdsc.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp
index 2bfd423305d..92fad4019fd 100644
--- a/src/devices/machine/laserdsc.cpp
+++ b/src/devices/machine/laserdsc.cpp
@@ -223,7 +223,10 @@ void laserdisc_device::device_start()
init_audio();
// register callbacks
- machine().configuration().config_register("laserdisc", config_load_delegate(&laserdisc_device::config_load, this), config_save_delegate(&laserdisc_device::config_save, this));
+ machine().configuration().config_register(
+ "laserdisc",
+ configuration_manager::load_delegate(&laserdisc_device::config_load, this),
+ configuration_manager::save_delegate(&laserdisc_device::config_save, this));
}
@@ -1040,20 +1043,16 @@ void laserdisc_device::process_track_data()
// configuration file
//-------------------------------------------------
-void laserdisc_device::config_load(config_type cfg_type, util::xml::data_node const *parentnode)
+void laserdisc_device::config_load(config_type cfg_type, config_level cfg_level, util::xml::data_node const *parentnode)
{
- // we only care about game files
- if (cfg_type != config_type::GAME)
- return;
-
- // might not have any data
- if (parentnode == nullptr)
+ // we only care system-specific configuration
+ if ((cfg_type != config_type::SYSTEM) || !parentnode)
return;
// iterate over overlay nodes
for (util::xml::data_node const *ldnode = parentnode->get_child("device"); ldnode != nullptr; ldnode = ldnode->get_next_sibling("device"))
{
- const char *devtag = ldnode->get_attribute_string("tag", "");
+ char const *const devtag = ldnode->get_attribute_string("tag", "");
if (strcmp(devtag, tag()) == 0)
{
// handle the overlay node
@@ -1078,13 +1077,13 @@ void laserdisc_device::config_load(config_type cfg_type, util::xml::data_node co
void laserdisc_device::config_save(config_type cfg_type, util::xml::data_node *parentnode)
{
- // we only care about game files
- if (cfg_type != config_type::GAME)
+ // we only save system-specific configuration
+ if (cfg_type != config_type::SYSTEM)
return;
// create a node
util::xml::data_node *const ldnode = parentnode->add_child("device", nullptr);
- if (ldnode != nullptr)
+ if (ldnode)
{
// output the basics
ldnode->set_attribute("tag", tag());