diff --git a/src/haptic/windows/SDL_dinputhaptic.c b/src/haptic/windows/SDL_dinputhaptic.c index fa374e4301..ce0bd30969 100644 --- a/src/haptic/windows/SDL_dinputhaptic.c +++ b/src/haptic/windows/SDL_dinputhaptic.c @@ -90,7 +90,7 @@ bool SDL_DINPUT_HapticInit(void) instance = GetModuleHandle(NULL); if (!instance) { SDL_SYS_HapticQuit(); - return SDL_SetError("GetModuleHandle() failed with error code %lu.", + return SDL_SetError("GetModuleHandle() failed with error code %" SDL_PRIuULONG ".", GetLastError()); } ret = IDirectInput8_Initialize(dinput, instance, DIRECTINPUT_VERSION); diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index b720288ef3..e9a8527807 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -431,7 +431,7 @@ bool SDL_DINPUT_JoystickInit(void) if (!instance) { IDirectInput8_Release(dinput); dinput = NULL; - return SDL_SetError("GetModuleHandle() failed with error code %lu.", GetLastError()); + return SDL_SetError("GetModuleHandle() failed with error code %" SDL_PRIuULONG ".", GetLastError()); } result = IDirectInput8_Initialize(dinput, instance, DIRECTINPUT_VERSION);