Update the SDL HIDAPI API to match upstream hidapi 0.14.0

This commit is contained in:
Sam Lantinga
2023-05-24 15:16:49 -07:00
parent 003a9b9666
commit af45ae7296
6 changed files with 176 additions and 25 deletions

View File

@@ -861,6 +861,9 @@ SDL3_0.0.0 {
SDL_wcstol;
SDL_swprintf;
SDL_vswprintf;
SDL_hid_get_input_report;
SDL_hid_get_device_info;
SDL_hid_get_report_descriptor;
# extra symbols go here (don't modify this line)
local: *;
};

View File

@@ -887,3 +887,6 @@
#define SDL_wcstol SDL_wcstol_REAL
#define SDL_swprintf SDL_swprintf_REAL
#define SDL_vswprintf SDL_vswprintf_REAL
#define SDL_hid_get_input_report SDL_hid_get_input_report_REAL
#define SDL_hid_get_device_info SDL_hid_get_device_info_REAL
#define SDL_hid_get_report_descriptor SDL_hid_get_report_descriptor_REAL

View File

@@ -797,7 +797,7 @@ SDL_DYNAPI_PROC(int,SDL_hid_get_product_string,(SDL_hid_device *a, wchar_t *b, s
SDL_DYNAPI_PROC(int,SDL_hid_get_serial_number_string,(SDL_hid_device *a, wchar_t *b, size_t c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_hid_init,(void),(),return)
SDL_DYNAPI_PROC(SDL_hid_device*,SDL_hid_open,(unsigned short a, unsigned short b, const wchar_t *c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_hid_device*,SDL_hid_open_path,(const char *a, int b),(a,b),return)
SDL_DYNAPI_PROC(SDL_hid_device*,SDL_hid_open_path,(const char *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_hid_read,(SDL_hid_device *a, unsigned char *b, size_t c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_hid_read_timeout,(SDL_hid_device *a, unsigned char *b, size_t c, int d),(a,b,c,d),return)
SDL_DYNAPI_PROC(int,SDL_hid_send_feature_report,(SDL_hid_device *a, const unsigned char *b, size_t c),(a,b,c),return)
@@ -932,3 +932,6 @@ SDL_DYNAPI_PROC(float,SDL_GetWindowDisplayScale,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(float,SDL_GetWindowPixelDensity,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(long,SDL_wcstol,(const wchar_t *a, wchar_t **b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_vswprintf,(wchar_t *a, size_t b, const wchar_t *c, va_list d),(a,b,c,d),return)
SDL_DYNAPI_PROC(int,SDL_hid_get_input_report,(SDL_hid_device *a, unsigned char *b, size_t c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_hid_device_info*,SDL_hid_get_device_info,(SDL_hid_device *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_hid_get_report_descriptor,(SDL_hid_device *a, unsigned char *b, size_t c),(a,b,c),return)