changeset 2588:57bd3e462138 gsoc2008_force_feedback

Seems like you have to set the data format too.
author Edgar Simo <bobbens@gmail.com>
date Mon, 04 Aug 2008 17:08:52 +0000
parents b4b3beaea5b5
children 1154ad945d94
files src/haptic/win32/SDL_syshaptic.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)) {