mirror of
https://github.com/glfw/glfw.git
synced 2025-10-03 21:30:57 +00:00
Bug fix: Use inotify_rm_watch() rather than close() to remove the Linux joystick watch.
This commit is contained in:
parent
4188c263e3
commit
08b0831b94
@ -277,11 +277,13 @@ void _glfwTerminateJoysticks(void)
|
|||||||
|
|
||||||
regfree(&_glfw.linux_js.regex);
|
regfree(&_glfw.linux_js.regex);
|
||||||
|
|
||||||
if (_glfw.linux_js.watch > 0)
|
|
||||||
close(_glfw.linux_js.watch);
|
|
||||||
|
|
||||||
if (_glfw.linux_js.inotify > 0)
|
if (_glfw.linux_js.inotify > 0)
|
||||||
|
{
|
||||||
|
if (_glfw.linux_js.watch > 0)
|
||||||
|
inotify_rm_watch(_glfw.linux_js.inotify, _glfw.linux_js.watch);
|
||||||
|
|
||||||
close(_glfw.linux_js.inotify);
|
close(_glfw.linux_js.inotify);
|
||||||
|
}
|
||||||
#endif // __linux__
|
#endif // __linux__
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user