mirror of https://github.com/libsdl-org/SDL
Make sure we only do GameCube adapter initialization if we were able to load libusb
This commit is contained in:
parent
3527b49459
commit
bf53651d73
|
@ -966,6 +966,10 @@ void SDL_EnableGameCubeAdaptors(void)
|
|||
ssize_t i, num_devs;
|
||||
int kernel_detached = 0;
|
||||
|
||||
if (libusb_ctx.libhandle == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (libusb_init(&usb_context) == 0) {
|
||||
num_devs = libusb_get_device_list(usb_context, &devs);
|
||||
for (i = 0; i < num_devs; ++i) {
|
||||
|
|
Loading…
Reference in New Issue