dinput: Support INFINITE as number of effect iterations.
This commit is contained in:
parent
441f7b6d9e
commit
c47677fee5
@ -29,6 +29,7 @@
|
|||||||
# include <linux/input.h>
|
# include <linux/input.h>
|
||||||
# undef SW_MAX
|
# undef SW_MAX
|
||||||
#endif
|
#endif
|
||||||
|
#include <limits.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
@ -518,7 +519,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
|
|||||||
|
|
||||||
event.type = EV_FF;
|
event.type = EV_FF;
|
||||||
event.code = This->effect.id;
|
event.code = This->effect.id;
|
||||||
event.value = dwIterations;
|
event.value = min( dwIterations, INT_MAX );
|
||||||
if (write(*(This->fd), &event, sizeof(event)) == -1) {
|
if (write(*(This->fd), &event, sizeof(event)) == -1) {
|
||||||
FIXME("Unable to write event. Assuming device disconnected.\n");
|
FIXME("Unable to write event. Assuming device disconnected.\n");
|
||||||
return DIERR_INPUTLOST;
|
return DIERR_INPUTLOST;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user