Seems like you have to set the data format too. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Mon, 04 Aug 2008 17:08:52 +0000
branchgsoc2008_force_feedback
changeset 258857bd3e462138
parent 2587 b4b3beaea5b5
child 2589 1154ad945d94
Seems like you have to set the data format too.
src/haptic/win32/SDL_syshaptic.c
     1.1 --- a/src/haptic/win32/SDL_syshaptic.c	Mon Aug 04 17:03:20 2008 +0000
     1.2 +++ b/src/haptic/win32/SDL_syshaptic.c	Mon Aug 04 17:08:52 2008 +0000
     1.3 @@ -229,6 +229,7 @@
     1.4   *       - Create DirectInputDevice2 interface.
     1.5   *       - Release DirectInputDevice interface.
     1.6   *       - Set cooperative level.
     1.7 + *       - Set data format.
     1.8   *       - Acquire exclusiveness.
     1.9   *       - Reset actuators.
    1.10   *       - Get supported featuers.
    1.11 @@ -277,6 +278,14 @@
    1.12        goto acquire_err;
    1.13     }
    1.14  
    1.15 +   /* Set data format. */
    1.16 +   ret = IDirectInputDevice2_SetDataFormat( haptic->hwdata->device,
    1.17 +                                            &c_dfDIJoystick2 );
    1.18 +   if (FAILED(ret)) {
    1.19 +      DI_SetError("Setting data format",ret);
    1.20 +      goto query_error;
    1.21 +   }
    1.22 +
    1.23     /* Acquire the device. */
    1.24     ret = IDirectInputDevice2_Acquire(haptic->hwdata->device);
    1.25     if (FAILED(ret)) {