summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/busmouse.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2024-10-18 00:47:56 +1100
committer Vas Crabb <vas@vastheman.com>2024-10-18 00:47:56 +1100
commit5f4e3730d9dc978730a53e6369312b931c250390 (patch)
tree7423d8cd2adefbf1252d6d6b67ff067d7f7b3784 /src/devices/machine/busmouse.cpp
parent61f3af53d0c9f083656f9b68e172302274866f6b (diff)
emu/ioport.h: Made syntax for configuring callbacks more consistent.
You now use FUNC or NAME to configure port field callbacks, like you would when configuring other kinds of callbacks. This has a number of benefits: * No need to remember different syntax for port field callbacks, and more approachable for new contributors. * May use function templates with multiple arugments using NAME((&...)) syntax without resorting to another layer of macros. * May use non-member functions on the odd chance it's useful. * More natural syntax for referring to member functions.
Diffstat (limited to 'src/devices/machine/busmouse.cpp')
-rw-r--r--src/devices/machine/busmouse.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/machine/busmouse.cpp b/src/devices/machine/busmouse.cpp
index 285e62051b4..98896edfe03 100644
--- a/src/devices/machine/busmouse.cpp
+++ b/src/devices/machine/busmouse.cpp
@@ -69,10 +69,10 @@ INPUT_CHANGED_MEMBER(bus_mouse_device::mouse_y_changed)
INPUT_PORTS_START( bus_mouse )
PORT_START("mouse_x")
- PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_CHANGED_MEMBER(DEVICE_SELF, bus_mouse_device, mouse_x_changed, 0)
+ PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(bus_mouse_device::mouse_x_changed), 0)
PORT_START("mouse_y")
- PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_CHANGED_MEMBER(DEVICE_SELF, bus_mouse_device, mouse_y_changed, 0)
+ PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(bus_mouse_device::mouse_y_changed), 0)
PORT_START("mouse_buttons")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Left Mouse Button") PORT_CODE(MOUSECODE_BUTTON1)