Marcel Hasler : dinput: Support INFINITE as number of effect iterations.
Alexandre Julliard
julliard at winehq.org
Thu Feb 2 12:10:37 CST 2012
Module: wine
Branch: master
Commit: c47677fee50b4f3c5a3844d9cfb8ea200b83c472
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c47677fee50b4f3c5a3844d9cfb8ea200b83c472
Author: Marcel Hasler <mahasler at gmail.com>
Date: Tue Jan 31 00:36:56 2012 +0100
dinput: Support INFINITE as number of effect iterations.
---
dlls/dinput/effect_linuxinput.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c
index c224bd8..ca43b17 100644
--- a/dlls/dinput/effect_linuxinput.c
+++ b/dlls/dinput/effect_linuxinput.c
@@ -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;
More information about the wine-cvs
mailing list