diff options
author | 2019-11-01 00:47:41 +1100 | |
---|---|---|
committer | 2019-11-01 00:47:41 +1100 | |
commit | 6f4c1f6e5b2525ac8b700b3a0754f5e99c4223e1 (patch) | |
tree | 4b0e0ac5cf1c3a7fd518a7d8f4d12f39291b2629 /src/devices/bus/interpro/mouse | |
parent | 0be348c7fbc8c0478f724ba098dabeb9eb3aab8c (diff) |
Spring cleaning:
* Changed emu_fatalerror to use util::string_format semantics
* Fixed some incorrectly marked up stuff in build scripts
* Make internal layout compression type a scoped enum (only zlib is supported still, but at least the values aren't magic numbers now)
* Fixed memory leaks in Xbox USB
* There can only be one "perfect quantum" device - enforce that only the root machine can set it, as allowing subdevices to will cause weird issues with slot cards overiding it
* Allow multiple devices to set maximum quantum and use the most restrictive one (it's maximum quantum, it would be minimum interleave)
* Got rid of device_slot_card_interface as it wasn't providing value
* Added a helper template to reduce certain kinds of boilerplate in slots/buses
* Cleaned up some particularly bad slot code (plenty more of that to do), and made some slots more idiomatic
Diffstat (limited to 'src/devices/bus/interpro/mouse')
-rw-r--r-- | src/devices/bus/interpro/mouse/mouse.cpp | 14 | ||||
-rw-r--r-- | src/devices/bus/interpro/mouse/mouse.h | 5 |
2 files changed, 5 insertions, 14 deletions
diff --git a/src/devices/bus/interpro/mouse/mouse.cpp b/src/devices/bus/interpro/mouse/mouse.cpp index ff13d7da8b2..835bcd1f68d 100644 --- a/src/devices/bus/interpro/mouse/mouse.cpp +++ b/src/devices/bus/interpro/mouse/mouse.cpp @@ -38,7 +38,7 @@ INPUT_PORTS_END interpro_mouse_port_device::interpro_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) : device_t(mconfig, INTERPRO_MOUSE_PORT, tag, owner, clock) - , device_slot_interface(mconfig, *this) + , device_single_card_slot_interface<device_interpro_mouse_port_interface>(mconfig, *this) , m_state_func(*this) , m_device(nullptr) { @@ -46,15 +46,7 @@ interpro_mouse_port_device::interpro_mouse_port_device(machine_config const &mco void interpro_mouse_port_device::device_config_complete() { - m_device = dynamic_cast<device_interpro_mouse_port_interface *>(get_card_device()); -} - -void interpro_mouse_port_device::device_validity_check(validity_checker &valid) const -{ - device_t *const card(get_card_device()); - - if (card && !dynamic_cast<device_interpro_mouse_port_interface *>(card)) - osd_printf_error("Device %s (%s) does not implement device_interpro_mouse_port_interface\n", card->tag(), card->name()); + m_device = get_card_device(); } void interpro_mouse_port_device::device_start() @@ -63,7 +55,7 @@ void interpro_mouse_port_device::device_start() } device_interpro_mouse_port_interface::device_interpro_mouse_port_interface(machine_config const &mconfig, device_t &device) - : device_slot_card_interface(mconfig, device) + : device_interface(device, "interpromouse") , m_port(dynamic_cast<interpro_mouse_port_device *>(device.owner())) { } diff --git a/src/devices/bus/interpro/mouse/mouse.h b/src/devices/bus/interpro/mouse/mouse.h index edcec942322..f10019605cb 100644 --- a/src/devices/bus/interpro/mouse/mouse.h +++ b/src/devices/bus/interpro/mouse/mouse.h @@ -7,7 +7,7 @@ class device_interpro_mouse_port_interface; -class interpro_mouse_port_device : public device_t, public device_slot_interface +class interpro_mouse_port_device : public device_t, public device_single_card_slot_interface<device_interpro_mouse_port_interface> { friend class device_interpro_mouse_port_interface; @@ -29,7 +29,6 @@ public: protected: // device-level overrides - virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; virtual void device_config_complete() override; @@ -39,7 +38,7 @@ private: device_interpro_mouse_port_interface *m_device; }; -class device_interpro_mouse_port_interface : public device_slot_card_interface +class device_interpro_mouse_port_interface : public device_interface { friend class interpro_mouse_port_device; |