From 83b96c81eeea58f1791c4d7715ef3421ee590b81 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 29 Jun 2010 13:47:46 +0000 Subject: Added new static call in diimage and added call to initialize subdevices for image device (no whatsnew) --- src/emu/diimage.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/emu/diimage.c') diff --git a/src/emu/diimage.c b/src/emu/diimage.c index a437449647f..d2aa51b879f 100644 --- a/src/emu/diimage.c +++ b/src/emu/diimage.c @@ -122,6 +122,21 @@ const char *device_config_image_interface::device_brieftypename(iodevice_t type) return (info != NULL) ? info->m_shortname : NULL; } +//------------------------------------------------- +// device_typeid - retrieves device type id +//------------------------------------------------- + +iodevice_t device_config_image_interface::device_typeid(const char *name) +{ + int i; + for (i = 0; i < ARRAY_LENGTH(device_config_image_interface::m_device_info_array); i++) + { + if (!mame_stricmp(name, m_device_info_array[i].m_name) || !mame_stricmp(name, m_device_info_array[i].m_shortname)) + return m_device_info_array[i].m_type; + } + return (iodevice_t)-1; +} + /*------------------------------------------------- device_compute_hash - compute a hash, using this device's partial hash if appropriate -- cgit v1.2.3-70-g09d2