mirror of
https://github.com/holub/mame
synced 2025-05-24 23:05:32 +03:00
siblingdevice now checks for and removes a leading "^" to
indicate the owner. This allows "^" to be used to reference the owning device in device callbacks, among other things.
This commit is contained in:
parent
52ccf5ffbc
commit
643793cce6
@ -768,6 +768,9 @@ inline device_t *device_t::siblingdevice(const char *tag) const
|
||||
// empty string or NULL means this device
|
||||
if (tag == NULL || *tag == 0)
|
||||
return const_cast<device_t *>(this);
|
||||
|
||||
// leading caret implies the owner, just skip it
|
||||
if (tag[0] == '^') tag++;
|
||||
|
||||
// query relative to the parent
|
||||
return (m_owner != NULL) ? m_owner->subdevice(tag) : NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user