winejoystick.drv: Implement POV support

Vincent Pelletier plr.vincent at gmail.com
Sun Jan 18 09:57:55 CST 2009


On Sun, Jan 18, 2009 at 5:01 AM, Austin English <austinenglish at gmail.com> wrote:
> Minor, but shouldn't that be 'case 17: /* Hat 0 Y */'

Right.
Actualy, I originally "stacked" all 4 supported hat definitions (times
2 axes, so 8 "case" lines), so I chose to only write what changed of
previous line (makes the pattern more visible, I think).
I removed the 6 other lines since windows API supports just one POV
per joystick, and it would probably be more confusing thant anything
else.

Also, I realised after sending the patch that there is a very similar
code to translate 2 axes to POV angles in dinput code, but with fewer
C lines. Should I resend my patch with that code instead ?

On another side note, I localy solved a force-feedback problem in
dinput code: linux kernel checks, when modifying/deleting a force
feedback effect, that it was uploaded using the same file descriptor.
But, at least for MS Flight Sim 2000, the controler can be released
after an effect has been sent, and before it gets updated again. My
local fix is just to never close the descriptor (and also prevent
opening it when it's already opened), but that's too bad to be sent. I
gave a quick think at making the close conditional to the number of
registered FF effects, but there doesn't seem to be any code to empty
the FF list, so it does not look to be a good solution.
Has anyone a better idea ?

-- 
Vincent Pelletier



More information about the wine-devel mailing list