mirror of https://github.com/encounter/SDL.git
Fixed Linux build
This commit is contained in:
parent
76e3bb55bb
commit
b9b0df40bf
|
@ -492,18 +492,28 @@ HIDAPI_ShutdownDiscovery()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SDL_USE_LIBUDEV)
|
#if defined(SDL_USE_LIBUDEV)
|
||||||
if (linux_enumeration_method == ENUMERATION_LIBUDEV &&
|
if (linux_enumeration_method == ENUMERATION_LIBUDEV) {
|
||||||
usyms) {
|
if (usyms) {
|
||||||
if (SDL_HIDAPI_discovery.m_pUdevMonitor) {
|
if (SDL_HIDAPI_discovery.m_pUdevMonitor) {
|
||||||
usyms->udev_monitor_unref(SDL_HIDAPI_discovery.m_pUdevMonitor);
|
usyms->udev_monitor_unref(SDL_HIDAPI_discovery.m_pUdevMonitor);
|
||||||
|
}
|
||||||
|
if (SDL_HIDAPI_discovery.m_pUdev) {
|
||||||
|
usyms->udev_unref(SDL_HIDAPI_discovery.m_pUdev);
|
||||||
|
}
|
||||||
|
SDL_UDEV_ReleaseUdevSyms();
|
||||||
|
usyms = NULL;
|
||||||
}
|
}
|
||||||
if (SDL_HIDAPI_discovery.m_pUdev) {
|
|
||||||
usyms->udev_unref(SDL_HIDAPI_discovery.m_pUdev);
|
|
||||||
}
|
|
||||||
SDL_UDEV_ReleaseUdevSyms();
|
|
||||||
usyms = NULL;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
#endif /* SDL_USE_LIBUDEV */
|
||||||
|
{
|
||||||
|
#if defined(HAVE_INOTIFY)
|
||||||
|
if (inotify_fd >= 0) {
|
||||||
|
close(inotify_fd);
|
||||||
|
inotify_fd = -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
SDL_HIDAPI_discovery.m_bInitialized = SDL_FALSE;
|
SDL_HIDAPI_discovery.m_bInitialized = SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1003,13 +1003,6 @@ HIDAPI_JoystickQuit(void)
|
||||||
|
|
||||||
SDL_HIDAPI_QuitRumble();
|
SDL_HIDAPI_QuitRumble();
|
||||||
|
|
||||||
#if defined(HAVE_INOTIFY)
|
|
||||||
if (inotify_fd >= 0) {
|
|
||||||
close(inotify_fd);
|
|
||||||
inotify_fd = -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while (SDL_HIDAPI_devices) {
|
while (SDL_HIDAPI_devices) {
|
||||||
HIDAPI_DelDevice(SDL_HIDAPI_devices);
|
HIDAPI_DelDevice(SDL_HIDAPI_devices);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue