summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2019-08-15 12:10:53 +0100
committer smf- <smf-@users.noreply.github.com>2019-08-15 12:11:21 +0100
commitd35c39bb165b7e2d3f23916ef2b220e6925f4f91 (patch)
treeb6fa9da1d9b29acd2c39893ce47e2f1cf6907b23 /src
parent5971c0ef26d85a71f689461f1623036e60de7072 (diff)
fix param casting (nw)
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/ti99/colorbus/busmouse.cpp10
1 files 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);