hidapi/windows: allow building on Windows, using the SDL C runtime
Signed-off-by: Sam Lantinga <slouken@libsdl.org>main
parent
57b33aec01
commit
b0ba509d87
|
@ -20,10 +20,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define standard library functions in terms of SDL */
|
/* Define standard library functions in terms of SDL */
|
||||||
|
#define HIDAPI_USING_SDL_RUNTIME
|
||||||
#define calloc SDL_calloc
|
#define calloc SDL_calloc
|
||||||
#define free SDL_free
|
#define free SDL_free
|
||||||
#define malloc SDL_malloc
|
#define malloc SDL_malloc
|
||||||
#define memcmp SDL_memcmp
|
#define memcmp SDL_memcmp
|
||||||
|
#define snprintf SDL_snprintf
|
||||||
|
#define strlen SDL_strlen
|
||||||
|
#define _strnicmp SDL_strncasecmp
|
||||||
#define swprintf SDL_swprintf
|
#define swprintf SDL_swprintf
|
||||||
#define towupper SDL_toupper
|
#define towupper SDL_toupper
|
||||||
#define wcscmp SDL_wcscmp
|
#define wcscmp SDL_wcscmp
|
||||||
|
|
|
@ -57,9 +57,11 @@ typedef LONG NTSTATUS;
|
||||||
#include "hidapi_hidclass.h"
|
#include "hidapi_hidclass.h"
|
||||||
#include "hidapi_hidsdi.h"
|
#include "hidapi_hidsdi.h"
|
||||||
|
|
||||||
|
#ifndef HIDAPI_USING_SDL_RUNTIME
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef MIN
|
#ifdef MIN
|
||||||
#undef MIN
|
#undef MIN
|
||||||
|
|
Loading…
Reference in New Issue