dinput: Support INFINITE as number of effect iterations (try 2)

Vitaliy Margolen wine-devel at kievinfo.com
Sun Jan 29 16:46:43 CST 2012


On 01/28/2012 05:56 PM, Marcel Hasler wrote:
> According to the DirectX reference, IDirectInputEffect::Start accepts
> INFINITE (aka -1) for the number of iterations. However, passing -1 to
> Linux via input_event results in no effect being played at all. This
> patch sets the number of iterations to the maximum signed value
> allowed if INFINITE is passed.
>
> This fixes bug 29712.
>
> This patch supersedes patch 83233. It does the same thing but adds a
> comment and should be easier to understand.

In general looks good. Would be nice to point out that linux/input.h says 
that any durations should not exceed 0x7fff as a maximum value.

Please don't make code "easier to read" by adding needless if / else. Your 
first patch was fine.

Vitaliy.



More information about the wine-devel mailing list