dinput: Support INFINITE as number of effect iterations.

This commit is contained in:
Marcel Hasler 2012-01-31 00:36:56 +01:00 committed by Alexandre Julliard
parent 441f7b6d9e
commit c47677fee5
1 changed files with 2 additions and 1 deletions

View File

@ -29,6 +29,7 @@
# include <linux/input.h>
# undef SW_MAX
#endif
#include <limits.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@ -518,7 +519,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
event.type = EV_FF;
event.code = This->effect.id;
event.value = dwIterations;
event.value = min( dwIterations, INT_MAX );
if (write(*(This->fd), &event, sizeof(event)) == -1) {
FIXME("Unable to write event. Assuming device disconnected.\n");
return DIERR_INPUTLOST;