diff --git a/src/hidapi/SDL_hidapi_windows.h b/src/hidapi/SDL_hidapi_windows.h index c368863d8..b1b6b4d67 100644 --- a/src/hidapi/SDL_hidapi_windows.h +++ b/src/hidapi/SDL_hidapi_windows.h @@ -20,10 +20,14 @@ */ /* Define standard library functions in terms of SDL */ +#define HIDAPI_USING_SDL_RUNTIME #define calloc SDL_calloc #define free SDL_free #define malloc SDL_malloc #define memcmp SDL_memcmp +#define snprintf SDL_snprintf +#define strlen SDL_strlen +#define _strnicmp SDL_strncasecmp #define swprintf SDL_swprintf #define towupper SDL_toupper #define wcscmp SDL_wcscmp diff --git a/src/hidapi/windows/hid.c b/src/hidapi/windows/hid.c index 98d5df4cd..0c992b2d5 100644 --- a/src/hidapi/windows/hid.c +++ b/src/hidapi/windows/hid.c @@ -57,9 +57,11 @@ typedef LONG NTSTATUS; #include "hidapi_hidclass.h" #include "hidapi_hidsdi.h" +#ifndef HIDAPI_USING_SDL_RUNTIME #include #include #include +#endif #ifdef MIN #undef MIN