src/haptic/win32/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2588 57bd3e462138
parent 2587 b4b3beaea5b5
child 2589 1154ad945d94
equal deleted inserted replaced
2587:b4b3beaea5b5 2588:57bd3e462138
   227  *    Steps:
   227  *    Steps:
   228  *       - Open temporary DirectInputDevice interface.
   228  *       - Open temporary DirectInputDevice interface.
   229  *       - Create DirectInputDevice2 interface.
   229  *       - Create DirectInputDevice2 interface.
   230  *       - Release DirectInputDevice interface.
   230  *       - Release DirectInputDevice interface.
   231  *       - Set cooperative level.
   231  *       - Set cooperative level.
       
   232  *       - Set data format.
   232  *       - Acquire exclusiveness.
   233  *       - Acquire exclusiveness.
   233  *       - Reset actuators.
   234  *       - Reset actuators.
   234  *       - Get supported featuers.
   235  *       - Get supported featuers.
   235  */
   236  */
   236 static int
   237 static int
   273                                                  SDL_HelperWindow,
   274                                                  SDL_HelperWindow,
   274                                                  DISCL_EXCLUSIVE | DISCL_BACKGROUND );
   275                                                  DISCL_EXCLUSIVE | DISCL_BACKGROUND );
   275    if (FAILED(ret)) {
   276    if (FAILED(ret)) {
   276       DI_SetError("Setting cooperative level to exclusive",ret);
   277       DI_SetError("Setting cooperative level to exclusive",ret);
   277       goto acquire_err;
   278       goto acquire_err;
       
   279    }
       
   280 
       
   281    /* Set data format. */
       
   282    ret = IDirectInputDevice2_SetDataFormat( haptic->hwdata->device,
       
   283                                             &c_dfDIJoystick2 );
       
   284    if (FAILED(ret)) {
       
   285       DI_SetError("Setting data format",ret);
       
   286       goto query_error;
   278    }
   287    }
   279 
   288 
   280    /* Acquire the device. */
   289    /* Acquire the device. */
   281    ret = IDirectInputDevice2_Acquire(haptic->hwdata->device);
   290    ret = IDirectInputDevice2_Acquire(haptic->hwdata->device);
   282    if (FAILED(ret)) {
   291    if (FAILED(ret)) {