summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/pckeybrd.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/machine/pckeybrd.h
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/devices/machine/pckeybrd.h')
-rw-r--r--src/devices/machine/pckeybrd.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h
index 7ee6c5c2c14..42a443226f5 100644
--- a/src/devices/machine/pckeybrd.h
+++ b/src/devices/machine/pckeybrd.h
@@ -20,12 +20,11 @@
class pc_keyboard_device : public device_t
{
public:
- pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE_LINE_MEMBER(enable);
- template <class Object> devcb_base &set_keypress_callback(Object &&cb) { return m_out_keypress_func.set_callback(std::forward<Object>(cb)); }
auto keypress() { return m_out_keypress_func.bind(); }
enum class KEYBOARD_TYPE
@@ -77,7 +76,13 @@ private:
class at_keyboard_device : public pc_keyboard_device
{
public:
- at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, KEYBOARD_TYPE type, int default_set)
+ : at_keyboard_device(mconfig, tag, owner, 0)
+ {
+ set_type(type, default_set);
+ }
+
+ at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
DECLARE_WRITE8_MEMBER( write );
@@ -114,18 +119,4 @@ INPUT_PORTS_EXTERN( at_keyboard );
DECLARE_DEVICE_TYPE(PC_KEYB, pc_keyboard_device)
DECLARE_DEVICE_TYPE(AT_KEYB, at_keyboard_device)
-#define MCFG_PC_KEYB_ADD(_tag, _cb) \
- MCFG_DEVICE_ADD(_tag, PC_KEYB, 0) \
- downcast<pc_keyboard_device &>(*device).set_keypress_callback(DEVCB_##_cb);
-
-#define MCFG_AT_KEYB_ADD(_tag, _def_set, _cb) \
- MCFG_DEVICE_ADD(_tag, AT_KEYB, 0) \
- downcast<at_keyboard_device &>(*device).set_type(pc_keyboard_device::KEYBOARD_TYPE::AT, _def_set); \
- downcast<pc_keyboard_device &>(*device).set_keypress_callback(DEVCB_##_cb);
-
-#define MCFG_AT_MF2_KEYB_ADD(_tag, _def_set, _cb) \
- MCFG_DEVICE_ADD(_tag, AT_KEYB, 0) \
- downcast<at_keyboard_device &>(*device).set_type(pc_keyboard_device::KEYBOARD_TYPE_MF2, _def_set); \
- downcast<pc_keyboard_device &>(*device).set_keypress_callback(DEVCB_##_cb);
-
#endif // MAME_MACHINE_PCKEYBRD_H