src/haptic/windows/SDL_dinputhaptic.c
changeset 8976 1a5d959d7b32
parent 8972 dfc759d7486f
child 9070 8973a237f360
equal deleted inserted replaced
8975:180271d72b1e 8976:1a5d959d7b32
   103 
   103 
   104     /* Because we used CoCreateInstance, we need to Initialize it, first. */
   104     /* Because we used CoCreateInstance, we need to Initialize it, first. */
   105     instance = GetModuleHandle(NULL);
   105     instance = GetModuleHandle(NULL);
   106     if (instance == NULL) {
   106     if (instance == NULL) {
   107         SDL_SYS_HapticQuit();
   107         SDL_SYS_HapticQuit();
   108         return SDL_SetError("GetModuleHandle() failed with error code %d.",
   108         return SDL_SetError("GetModuleHandle() failed with error code %lu.",
   109             GetLastError());
   109             GetLastError());
   110     }
   110     }
   111     ret = IDirectInput8_Initialize(dinput, instance, DIRECTINPUT_VERSION);
   111     ret = IDirectInput8_Initialize(dinput, instance, DIRECTINPUT_VERSION);
   112     if (FAILED(ret)) {
   112     if (FAILED(ret)) {
   113         SDL_SYS_HapticQuit();
   113         SDL_SYS_HapticQuit();