summaryrefslogtreecommitdiffstats
path: root/src/emu/device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/device.cpp')
-rw-r--r--src/emu/device.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/emu/device.cpp b/src/emu/device.cpp
index 6bd458b0e0b..058ac84d7c4 100644
--- a/src/emu/device.cpp
+++ b/src/emu/device.cpp
@@ -315,6 +315,10 @@ void device_t::config_complete()
void device_t::validity_check(validity_checker &valid) const
{
+ // validate callbacks
+ for (devcb_base const *callback : m_callbacks)
+ callback->validity_check(valid);
+
// validate via the interfaces
for (device_interface &intf : interfaces())
intf.interface_validity_check(valid);
@@ -950,6 +954,13 @@ finder_base *device_t::register_auto_finder(finder_base &autodev)
return old;
}
+
+void device_t::register_callback(devcb_base &callback)
+{
+ m_callbacks.emplace_back(&callback);
+}
+
+
//**************************************************************************
// LIVE DEVICE INTERFACES
//**************************************************************************