Index: src/haptic/windows/SDL_dinputhaptic.c =================================================================== --- src/haptic/windows/SDL_dinputhaptic.c (revision 1785) +++ src/haptic/windows/SDL_dinputhaptic.c (working copy) @@ -331,14 +331,6 @@ goto acquire_err; } - /* Get number of axes. */ - ret = IDirectInputDevice8_EnumObjects(haptic->hwdata->device, - DI_DeviceObjectCallback, - haptic, DIDFT_AXIS); - if (FAILED(ret)) { - DI_SetError("Getting device axes", ret); - goto acquire_err; - } /* Acquire the device. */ ret = IDirectInputDevice8_Acquire(haptic->hwdata->device); @@ -348,6 +340,15 @@ } } + /* Get number of axes. */ + ret = IDirectInputDevice8_EnumObjects(haptic->hwdata->device, + DI_DeviceObjectCallback, + haptic, DIDFT_AXIS); + if (FAILED(ret)) { + DI_SetError("Getting device axes", ret); + goto acquire_err; + } + /* Reset all actuators - just in case. */ ret = IDirectInputDevice8_SendForceFeedbackCommand(haptic->hwdata->device, DISFFC_RESET);