diff options
author | 2015-01-25 22:12:59 +0100 | |
---|---|---|
committer | 2015-01-25 22:12:59 +0100 | |
commit | 41408bae3b2d761ea53a0f9f826855d4c2542e87 (patch) | |
tree | 8019511b2870a9453789867309fca2980886bcd0 /src/emu/device.c | |
parent | 36c9bba47db88ab3e42e422d26a35de3536d1d76 (diff) | |
parent | 35947ff256bc7e066f8b49ad45c7383b14a9e8ee (diff) |
Merge branch 'master' of https://github.com/mamedev/mame.git
Diffstat (limited to 'src/emu/device.c')
-rw-r--r-- | src/emu/device.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/emu/device.c b/src/emu/device.c index ea43ad04269..25687338338 100644 --- a/src/emu/device.c +++ b/src/emu/device.c @@ -186,6 +186,23 @@ ioport_port *device_t::ioport(const char *tag) const //------------------------------------------------- +// ioport - return a pointer to the I/O port +// object for a given port name +//------------------------------------------------- + +astring device_t::parameter(const char *tag) const +{ + // safety first + if (this == NULL) + return NULL; + + // build a fully-qualified name and look it up + astring fullpath; + return machine().parameters().lookup(subtag(fullpath, tag)); +} + + +//------------------------------------------------- // static_set_clock - set/change the clock on // a device //------------------------------------------------- |