mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-25 04:28:29 +00:00
hidapi, libusb: backport read_thread indefinite loop fix from mainstream
Mainstream commit:
5ce9051e2f
This commit is contained in:

committed by
Sam Lantinga

parent
379d478055
commit
8bcbdc706c
@@ -738,6 +738,7 @@ static struct
|
||||
);
|
||||
int (LIBUSB_CALL *handle_events)(libusb_context *ctx);
|
||||
int (LIBUSB_CALL *handle_events_completed)(libusb_context *ctx, int *completed);
|
||||
const char * (LIBUSB_CALL *error_name)(int errcode);
|
||||
} libusb_ctx;
|
||||
|
||||
#define libusb_init libusb_ctx.init
|
||||
@@ -766,6 +767,7 @@ static struct
|
||||
#define libusb_interrupt_transfer libusb_ctx.interrupt_transfer
|
||||
#define libusb_handle_events libusb_ctx.handle_events
|
||||
#define libusb_handle_events_completed libusb_ctx.handle_events_completed
|
||||
#define libusb_error_name libusb_ctx.error_name
|
||||
|
||||
#define hid_device LIBUSB_hid_device
|
||||
#define hid_device_ LIBUSB_hid_device_
|
||||
@@ -843,6 +845,7 @@ SDL_libusb_get_string_descriptor(libusb_device_handle *dev,
|
||||
#undef libusb_interrupt_transfer
|
||||
#undef libusb_handle_events
|
||||
#undef libusb_handle_events_completed
|
||||
#undef libusb_error_name
|
||||
|
||||
#undef hid_device
|
||||
#undef hid_device_
|
||||
@@ -1109,6 +1112,7 @@ int SDL_hid_init(void)
|
||||
LOAD_LIBUSB_SYMBOL(interrupt_transfer)
|
||||
LOAD_LIBUSB_SYMBOL(handle_events)
|
||||
LOAD_LIBUSB_SYMBOL(handle_events_completed)
|
||||
LOAD_LIBUSB_SYMBOL(error_name)
|
||||
#undef LOAD_LIBUSB_SYMBOL
|
||||
|
||||
if (!loaded) {
|
||||
|
Reference in New Issue
Block a user