src/haptic/win32/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2588 57bd3e462138
parent 2587 b4b3beaea5b5
child 2589 1154ad945d94
--- a/src/haptic/win32/SDL_syshaptic.c	Mon Aug 04 17:03:20 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Mon Aug 04 17:08:52 2008 +0000
@@ -229,6 +229,7 @@
  *       - Create DirectInputDevice2 interface.
  *       - Release DirectInputDevice interface.
  *       - Set cooperative level.
+ *       - Set data format.
  *       - Acquire exclusiveness.
  *       - Reset actuators.
  *       - Get supported featuers.
@@ -277,6 +278,14 @@
       goto acquire_err;
    }
 
+   /* Set data format. */
+   ret = IDirectInputDevice2_SetDataFormat( haptic->hwdata->device,
+                                            &c_dfDIJoystick2 );
+   if (FAILED(ret)) {
+      DI_SetError("Setting data format",ret);
+      goto query_error;
+   }
+
    /* Acquire the device. */
    ret = IDirectInputDevice2_Acquire(haptic->hwdata->device);
    if (FAILED(ret)) {