src/haptic/windows/SDL_syshaptic.c
changeset 5539 b305e3c2d2e7
parent 5535 96594ac5fd1a
child 5591 17beb16fa838
--- a/src/haptic/windows/SDL_syshaptic.c	Mon Apr 18 12:20:30 2011 -0700
+++ b/src/haptic/windows/SDL_syshaptic.c	Tue Apr 19 08:08:50 2011 -0700
@@ -549,6 +549,8 @@
 {
     HRESULT ret;
     DIDEVICEINSTANCE hap_instance, joy_instance;
+    hap_instance.dwSize = sizeof(DIDEVICEINSTANCE);
+    joy_instance.dwSize = sizeof(DIDEVICEINSTANCE);
 
     /* Get the device instances. */
     ret = IDirectInputDevice2_GetDeviceInfo(haptic->hwdata->device,
@@ -578,6 +580,7 @@
     int i, ret;
     HRESULT idret;
     DIDEVICEINSTANCE joy_instance;
+    joy_instance.dwSize = sizeof(DIDEVICEINSTANCE);
 
     /* Since it comes from a joystick we have to try to match it with a haptic device on our haptic list. */
     for (i=0; i<SDL_numhaptics; i++) {