diff options
author | Olivier Galibert <galibert@pobox.com> | 2018-01-07 22:20:14 +0100 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2018-01-17 16:11:18 +0100 |
commit | d469cc04bcace0f601802301caeddc5b473b75f2 (patch) | |
tree | a9d71540c9c69cee5ab3a533476b81833fa02f5f /src/devices/imagedev | |
parent | 9f383f76ce6f00cc3320e5ba53dc323781e0077b (diff) |
API Change: Machine configs are now a method of the owner class, and the prototype is simplified [O. Galibert]
Beware, the device context does not follow in MCFG_FRAGMENT_ADD
anymore due to the prototype change. So creating a device then
configuring through a fragment doesn't work as-is. The simplest
solution is just to add a MCFG_DEVICE_MODIFY at the start of the
fragment with the correct tag.
Diffstat (limited to 'src/devices/imagedev')
-rw-r--r-- | src/devices/imagedev/diablo.h | 4 | ||||
-rw-r--r-- | src/devices/imagedev/floppy.cpp | 2 | ||||
-rw-r--r-- | src/devices/imagedev/harddriv.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/imagedev/diablo.h b/src/devices/imagedev/diablo.h index 087a097ed2a..5f1ed1e141c 100644 --- a/src/devices/imagedev/diablo.h +++ b/src/devices/imagedev/diablo.h @@ -81,10 +81,10 @@ DECLARE_DEVICE_TYPE(DIABLO, diablo_image_device) MCFG_DEVICE_ADD(_tag, DIABLO, 0) #define MCFG_DIABLO_LOAD(_class,_method) \ - diablo_image_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), downcast<_class *>(owner))); + diablo_image_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), this)); #define MCFG_DIABLO_UNLOAD(_class,_method) \ - diablo_image_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), downcast<_class *>(owner))); + diablo_image_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), this)); #define MCFG_DIABLO_INTERFACE(_interface) \ diablo_image_device::static_set_interface(*device, _interface); diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index deaf8400aec..af759eddace 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -1361,7 +1361,7 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, stream_sampl #define FLOPSPK "flopsndout" -MACHINE_CONFIG_MEMBER( floppy_image_device::device_add_mconfig ) +MACHINE_CONFIG_START(floppy_image_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_MONO(FLOPSPK) MCFG_SOUND_ADD(FLOPSND_TAG, FLOPPYSOUND, 44100) MCFG_SOUND_ROUTE(ALL_OUTPUTS, FLOPSPK, 0.5) diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h index bac33321cb6..5c683e54fcf 100644 --- a/src/devices/imagedev/harddriv.h +++ b/src/devices/imagedev/harddriv.h @@ -84,10 +84,10 @@ DECLARE_DEVICE_TYPE(HARDDISK, harddisk_image_device) MCFG_DEVICE_ADD(_tag, HARDDISK, 0) #define MCFG_HARDDISK_LOAD(_class,_method) \ - harddisk_image_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), downcast<_class *>(owner))); + harddisk_image_device::static_set_device_load(*device, device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), this)); #define MCFG_HARDDISK_UNLOAD(_class,_method) \ - harddisk_image_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), downcast<_class *>(owner))); + harddisk_image_device::static_set_device_unload(*device, device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), this)); #define MCFG_HARDDISK_INTERFACE(_interface) \ harddisk_image_device::static_set_interface(*device, _interface); |