summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/terminal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/terminal.h')
-rw-r--r--src/devices/machine/terminal.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/devices/machine/terminal.h b/src/devices/machine/terminal.h
index dab8bd40578..aa98c91dc62 100644
--- a/src/devices/machine/terminal.h
+++ b/src/devices/machine/terminal.h
@@ -23,18 +23,11 @@ class generic_terminal_device : public device_t
public:
generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class FunctionClass>
- void set_keyboard_callback(void (FunctionClass::*callback)(u8 character), const char *name)
+ template <typename... T>
+ void set_keyboard_callback(T &&... args)
{
- set_keyboard_callback(generic_keyboard_device::output_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ m_keyboard_cb.set(std::forward<T>(args)...);
}
- // FIXME: this should be aware of current device for resolving the tag
- template <class FunctionClass>
- void set_keyboard_callback(const char *devname, void (FunctionClass::*callback)(u8 character), const char *name)
- {
- set_keyboard_callback(generic_keyboard_device::output_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
- }
- void set_keyboard_callback(generic_keyboard_device::output_delegate callback) { m_keyboard_cb = callback; }
void write(u8 data) { term_write(data); }