From d35c39bb165b7e2d3f23916ef2b220e6925f4f91 Mon Sep 17 00:00:00 2001 From: smf- Date: Thu, 15 Aug 2019 12:10:53 +0100 Subject: fix param casting (nw) --- src/devices/bus/ti99/colorbus/busmouse.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/devices/bus/ti99/colorbus/busmouse.cpp b/src/devices/bus/ti99/colorbus/busmouse.cpp index 0c26c0047b2..92101ff989f 100644 --- a/src/devices/bus/ti99/colorbus/busmouse.cpp +++ b/src/devices/bus/ti99/colorbus/busmouse.cpp @@ -52,20 +52,22 @@ void v9938_busmouse_device::device_reset() INPUT_CHANGED_MEMBER( v9938_busmouse_device::mouse_button_changed ) { - LOGMASKED(LOG_BUTTON, "Button %d: %d\n", (long)param, newval); + const int mask((int)(uint64_t)param); + LOGMASKED(LOG_BUTTON, "Button %d: %d\n", mask, newval); if (newval==1) - m_bstate |= (long)param; + m_bstate |= mask; else - m_bstate &= ~(long)param; + m_bstate &= ~mask; m_colorbus->buttons(m_bstate); } INPUT_CHANGED_MEMBER( v9938_busmouse_device::mouse_pos_changed ) { + const int mask((int)(uint64_t)param); int16_t pos = (int16_t)newval; int delta; - if ((long)param==1) + if (mask==1) { delta = pos - m_last_x; LOGMASKED(LOG_MOVEX, "posx = %d, delta x = %d\n", pos, delta); -- cgit v1.2.3