Include standard wrapping for SDL public headers in SDL_hidapi.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/include/SDL_hidapi.h b/include/SDL_hidapi.h
index 9264cf1..7ce86b8 100644
--- a/include/SDL_hidapi.h
+++ b/include/SDL_hidapi.h
@@ -62,6 +62,14 @@
#ifndef SDL_hidapi_h_
#define SDL_hidapi_h_
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \brief A handle representing an open HID device
*/
@@ -113,6 +121,7 @@ typedef struct SDL_hid_device_info
struct SDL_hid_device_info *next;
} SDL_hid_device_info;
+
/**
* Initialize the HIDAPI library.
*
@@ -423,6 +432,12 @@ extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev
*/
extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
#endif /* SDL_hidapi_h_ */
/* vi: set sts=4 ts=4 sw=4 expandtab: */