diff options
Diffstat (limited to 'src/devices/machine/microtch.h')
-rw-r--r-- | src/devices/machine/microtch.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/devices/machine/microtch.h b/src/devices/machine/microtch.h index 592b0a669da..0cb486aa3f1 100644 --- a/src/devices/machine/microtch.h +++ b/src/devices/machine/microtch.h @@ -13,15 +13,14 @@ class microtouch_device : { public: microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template <class Object> devcb_base &set_stx_callback(Object &&cb) { return m_out_stx_func.set_callback(std::forward<Object>(cb)); } auto stx() { return m_out_stx_func.bind(); } virtual ioport_constructor device_input_ports() const override; DECLARE_WRITE_LINE_MEMBER(rx) { device_serial_interface::rx_w(state); } DECLARE_INPUT_CHANGED_MEMBER(touch); - typedef delegate<int (int *, int *)> touch_cb; - template <typename Object> void set_touch_callback(Object &&cb) { m_out_touch_cb = std::forward<Object>(cb); } + typedef device_delegate<int (int *, int *)> touch_cb; + template <typename... T> void set_touch_callback(T &&... args) { m_out_touch_cb = touch_cb(std::forward<T>(args)...); } protected: virtual void device_start() override; @@ -73,11 +72,4 @@ private: DECLARE_DEVICE_TYPE(MICROTOUCH, microtouch_device) -#define MCFG_MICROTOUCH_ADD(_tag, _clock, _devcb) \ - MCFG_DEVICE_ADD(_tag, MICROTOUCH, _clock) \ - downcast<microtouch_device &>(*device).set_stx_callback(DEVCB_##_devcb); - -#define MCFG_MICROTOUCH_TOUCH_CB(_class, _touch_cb) \ - downcast<microtouch_device &>(*device).set_touch_callback(microtouch_device::touch_cb(&_class::_touch_cb, this)); - #endif // MAME_MACHINE_MICROTCH_H |