Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Seems like you have to set the data format too.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Aug 4, 2008
1 parent 5b896d3 commit 00c317a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/haptic/win32/SDL_syshaptic.c
Expand Up @@ -229,6 +229,7 @@ DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv)
* - Create DirectInputDevice2 interface.
* - Release DirectInputDevice interface.
* - Set cooperative level.
* - Set data format.
* - Acquire exclusiveness.
* - Reset actuators.
* - Get supported featuers.
Expand Down Expand Up @@ -277,6 +278,14 @@ SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance)
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)) {
Expand Down

0 comments on commit 00c317a

Please sign in to comment.