Hi,

Here is a patch to fix problems with negative valuator values and
XQueryDeviceState().  Without this, joysticks and other devices
always return -2^31 with negative valuator values.

If changing DeviceEvent.valuators.data to a signed integer is
undesirable, another workable (but IMO grosser) fix is in
queryst.c:ProcXQueryDeviceState() changing this line:

*((int *)buf) = *values;

to:

*((int *)buf) = (int) (unsigned int) *values;

Thanks,
Joe

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to