* added TRACE info
* we now put data in cbuf at the good offset The mouse is now working ok in Haiku, tested with input_server. The current implementation based on our cbuf isn't good, as we're erasing old data, if mouse input addon can't keep up with interrupts. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12352 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -187,6 +187,8 @@ ps2_packet_to_movement(uint8 packet[], mouse_movement *pos)
|
|||||||
pos->timestamp = currentTime;
|
pos->timestamp = currentTime;
|
||||||
pos->wheel_ydelta = (int)wheel_ydelta;
|
pos->wheel_ydelta = (int)wheel_ydelta;
|
||||||
pos->wheel_xdelta = (int)wheel_xdelta;
|
pos->wheel_xdelta = (int)wheel_xdelta;
|
||||||
|
|
||||||
|
TRACE(("xdelta: %d, ydelta: %d, buttons %x, clicks: %d, timestamp %Ld\n", xDelta, yDelta, buttons, sClickCount, currentTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,7 +232,7 @@ static int32
|
|||||||
handle_mouse_interrupt(void* data)
|
handle_mouse_interrupt(void* data)
|
||||||
{
|
{
|
||||||
int8 read;
|
int8 read;
|
||||||
TRACE(("mouse interrupt occurred!!!\n"));
|
//TRACE(("mouse interrupt occurred!!!\n"));
|
||||||
|
|
||||||
read = gIsa->read_io_8(PS2_PORT_CTRL);
|
read = gIsa->read_io_8(PS2_PORT_CTRL);
|
||||||
|
|
||||||
@@ -240,7 +242,8 @@ handle_mouse_interrupt(void* data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
read = read_data_byte();
|
read = read_data_byte();
|
||||||
cbuf_memcpy_to_chain(sMouseChain, 0, &read, sizeof(read));
|
TRACE(("mouse interrupt : byte %x\n", read));
|
||||||
|
cbuf_memcpy_to_chain(sMouseChain, sSync, &read, sizeof(read));
|
||||||
|
|
||||||
if (sSync == 0 && !(read & 8)) {
|
if (sSync == 0 && !(read & 8)) {
|
||||||
TRACE(("mouse resynched, bad data\n"));
|
TRACE(("mouse resynched, bad data\n"));
|
||||||
|
|||||||
Reference in New Issue
Block a user