mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
diimage: allow image devices to skip core fopen() of the image's filename and handle themselves in call_load() [R. Belmont]
This commit is contained in:
parent
aec743cb17
commit
7cd142d28d
@ -936,6 +936,8 @@ bool device_image_interface::load_internal(const char *path, bool is_create, int
|
||||
if (m_err)
|
||||
goto done;
|
||||
|
||||
if (core_opens_image_file())
|
||||
{
|
||||
/* Check if there's a software list defined for this device and use that if we're not creating an image */
|
||||
if (!filename_has_period && !just_load)
|
||||
{
|
||||
@ -978,6 +980,7 @@ bool device_image_interface::load_internal(const char *path, bool is_create, int
|
||||
m_err = IMAGE_ERROR_FILENOTFOUND;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* call device load or create */
|
||||
m_create_format = create_format;
|
||||
|
@ -154,6 +154,7 @@ public:
|
||||
virtual void call_display() { }
|
||||
virtual void call_display_info() { }
|
||||
virtual device_image_partialhash_func get_partial_hash() const { return NULL; }
|
||||
virtual bool core_opens_image_file() const { return TRUE; }
|
||||
virtual iodevice_t image_type() const = 0;
|
||||
virtual bool is_readable() const = 0;
|
||||
virtual bool is_writeable() const = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user