Implementing IDirectInputDevice2::Poll for Wine

larstiq at larstiq.dyndns.org larstiq at larstiq.dyndns.org
Thu Oct 25 16:51:28 CDT 2001


Hi,

according to Lionel Ulmer, Wine's dinput devices never need to be polled,
so all that needs to be done is return DI_NOEFFECT, calling Poll has no effect.

If wine's devices ever get to be polled, this will not be good enough, to that
extent the current FIXME is useful, but still, returning DI_NOEFFECT would be
correcter with the current devices.


Anyway, this is my first wine-patch, so if anyone has tips or comments, I'd
appreciate it.

LarstiQ
-------------- next part --------------
Index: device.c
===================================================================
RCS file: /cvsroot/winex/wine/dlls/dinput/device.c,v
retrieving revision 1.1.1.2
diff -u -b -B -r1.1.1.2 device.c
--- device.c	2001/01/26 21:26:24	1.1.1.2
+++ device.c	2001/10/25 20:54:10
@@ -498,9 +498,8 @@
 HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
 	LPDIRECTINPUTDEVICE2A iface)
 {
-	FIXME("(this=%p): stub!\n",
-	      iface);
-	return DI_OK;
+	/* Because wine devices do not need to be polled, just return DI_NOEFFECT */
+	return DI_NOEFFECT;
 }
 
 HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(


More information about the wine-patches mailing list