Fixed close being used instead of inotify_rm_watch.

Closes #432.
Fixes #440.
This commit is contained in:
Jonathan Miller 2015-01-23 16:53:41 -05:00 committed by Camilla Berglund
parent 98e36753e6
commit dc4f0f6c91
2 changed files with 7 additions and 3 deletions

View File

@ -68,6 +68,7 @@ GLFW bundles a number of dependencies in the `deps/` directory.
- [X11] Added support for Cygwin-X - [X11] Added support for Cygwin-X
- [X11] Made XInput2 optional at compile-time - [X11] Made XInput2 optional at compile-time
- [X11] Made Xxf86vm optional at compile-time - [X11] Made Xxf86vm optional at compile-time
- [X11] Bugfix: `glfwTerminate` could close an unrelated file descriptor
## Contact ## Contact
@ -142,6 +143,7 @@ skills.
- David Medlock - David Medlock
- Jonathan Mercier - Jonathan Mercier
- Marcel Metz - Marcel Metz
- Jonathan Miller
- Kenneth Miller - Kenneth Miller
- Bruce Mitchener - Bruce Mitchener
- Jack Moffitt - Jack Moffitt

View File

@ -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__
} }