Hi,

On Mon, 11 Jun 2007, Dmitry Torokhov wrote:
I have some concerns over this patch - when mapping dpad to buttons
your new mapping follows mapping for classic xbox; however it is still
different when mapping dpad to axes so this is suspicious. Could you
please try the attached patch and tell me if it works for you?

Yes your patch is working and I have to admit that it even looks better :)


Also, please avoid constructs like this:

+ input_report_abs(dev, ABS_HAT0Y, !!((data[2] & 0x08) >> 3) - !!((data[2] & 0x04) >> 2));

Doing shift is meaningles if you convert result to 0/1. I.e. it is
exactly the same as !!(data[2] & 0x08) - !!(data[2] &0x04).

Ah thanks, it is so obvious. I somehow forget to think.

Jan

Reply via email to