+ added X/Y overflow for Mouse emulation

This commit is contained in:
ekeeke31 2009-04-21 15:23:32 +00:00
parent 3f6925dc8a
commit 60cdda4c53

View File

@ -205,8 +205,10 @@ uint32 mouse_read()
break;
case 4: /* Axis sign and overflow */
if (input.analog[2][0] < 0) temp |= 0x01;
if (input.analog[2][1] < 0) temp |= 0x02;
if (input.analog[2][0] < 0) temp |= 0x01;
if (input.analog[2][1] < 0) temp |= 0x02;
if (abs(input.analog[2][0]) > 255) temp |= 0x04;
if (abs(input.analog[2][1]) > 255) temp |= 0x08;
break;
case 5: /* Buttons state */