Hi all,
Working trying to fix the mouse handling in the rmnimbus driver.....
Is there a way of defining a mouse in a driver such that it returns a movement delta?
Ideally what I'd want is, 0 if the mouse is not moved +ve if moved right (for example) and -ve if moved right? No matter what I do the read() function always seems to return a +ve value that wraps.
Ports are currently defined as :
PORT_START(MOUSEX_TAG) /* Mouse - X AXIS */
PORT_BIT( 0xfff, 0x000, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1)
PORT_START(MOUSEY_TAG) /* Mouse - Y AXIS */
PORT_BIT( 0xfff, 0x000, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1)
And I'm reading them with :
int x = 0;
int y = 0;
x = m_io_mousex->read();
y = m_io_mousey->read();
if (x != 0)
logerror("x=%d\n",x);
Can anyone give me some hints please?
Cheers.
Phill.