src/joystick/windows/SDL_dinputjoystick.c
changeset 8976 1a5d959d7b32
parent 8972 dfc759d7486f
child 9475 d5adc0c06a03
equal deleted inserted replaced
8975:180271d72b1e 8976:1a5d959d7b32
   229 {
   229 {
   230     /*
   230     /*
   231     return SDL_SetError("%s() [%s]: %s", function,
   231     return SDL_SetError("%s() [%s]: %s", function,
   232     DXGetErrorString9A(code), DXGetErrorDescription9A(code));
   232     DXGetErrorString9A(code), DXGetErrorDescription9A(code));
   233     */
   233     */
   234     return SDL_SetError("%s() DirectX error %d", function, code);
   234     return SDL_SetError("%s() DirectX error 0x%8.8lx", function, code);
   235 }
   235 }
   236 
   236 
   237 static SDL_bool
   237 static SDL_bool
   238 SDL_IsXInputDevice(const GUID* pGuidProductFromDirectInput)
   238 SDL_IsXInputDevice(const GUID* pGuidProductFromDirectInput)
   239 {
   239 {
   322     }
   322     }
   323 
   323 
   324     /* Because we used CoCreateInstance, we need to Initialize it, first. */
   324     /* Because we used CoCreateInstance, we need to Initialize it, first. */
   325     instance = GetModuleHandle(NULL);
   325     instance = GetModuleHandle(NULL);
   326     if (instance == NULL) {
   326     if (instance == NULL) {
   327         return SDL_SetError("GetModuleHandle() failed with error code %d.", GetLastError());
   327         return SDL_SetError("GetModuleHandle() failed with error code %lu.", GetLastError());
   328     }
   328     }
   329     result = IDirectInput8_Initialize(dinput, instance, DIRECTINPUT_VERSION);
   329     result = IDirectInput8_Initialize(dinput, instance, DIRECTINPUT_VERSION);
   330 
   330 
   331     if (FAILED(result)) {
   331     if (FAILED(result)) {
   332         return SetDIerror("IDirectInput::Initialize", result);
   332         return SetDIerror("IDirectInput::Initialize", result);