diff options
author | 2010-06-29 13:47:46 +0000 | |
---|---|---|
committer | 2010-06-29 13:47:46 +0000 | |
commit | 83b96c81eeea58f1791c4d7715ef3421ee590b81 (patch) | |
tree | 489f47b569db61e6506d458bf8584c95c3ae6b9a | |
parent | 4054f61980207a57945f2a6725476eac6e5133d1 (diff) |
Added new static call in diimage and added call to initialize subdevices for image device (no whatsnew)
-rw-r--r-- | src/emu/diimage.c | 15 | ||||
-rw-r--r-- | src/emu/diimage.h | 3 | ||||
-rw-r--r-- | src/emu/image.c | 2 |
3 files changed, 19 insertions, 1 deletions
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 diff --git a/src/emu/diimage.h b/src/emu/diimage.h index 4292493d483..c5e530cc479 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -169,10 +169,11 @@ public: virtual const char *brief_instance_name() const = 0; virtual bool uses_file_extension(const char *file_extension) const = 0; virtual const option_guide *create_option_guide() const = 0; - virtual image_device_format *formatlist() const = 0; + virtual image_device_format *formatlist() const = 0; static const char *device_typename(iodevice_t type); static const char *device_brieftypename(iodevice_t type); + static iodevice_t device_typeid(const char *name); virtual device_image_partialhash_func get_partial_hash() const = 0; virtual void device_compute_hash(char *dest, const void *data, size_t length, unsigned int functions) const; diff --git a/src/emu/image.c b/src/emu/image.c index 8e7d6233d55..41cd8634c63 100644 --- a/src/emu/image.c +++ b/src/emu/image.c @@ -245,6 +245,8 @@ void image_device_init(running_machine *machine) fatalerror_exitcode(machine, MAMERR_DEVICE, "Driver requires that device \"%s\" must have an image to load", image->image_config().instance_name()); } } + + image->call_get_devices(); } } |