mirror of
https://github.com/glfw/glfw.git
synced 2024-12-01 22:37:12 +00:00
X11: Fix set not being reset each call to select
This commit is contained in:
parent
67a55efa27
commit
ef5a21496c
@ -59,16 +59,19 @@ static GLFWbool waitForEvent(double* timeout)
|
|||||||
const int fd = ConnectionNumber(_glfw.x11.display);
|
const int fd = ConnectionNumber(_glfw.x11.display);
|
||||||
int count = fd + 1;
|
int count = fd + 1;
|
||||||
|
|
||||||
FD_ZERO(&fds);
|
|
||||||
FD_SET(fd, &fds);
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
FD_SET(_glfw.linjs.inotify, &fds);
|
if (_glfw.linjs.inotify > fd)
|
||||||
|
|
||||||
if (fd < _glfw.linjs.inotify)
|
|
||||||
count = _glfw.linjs.inotify + 1;
|
count = _glfw.linjs.inotify + 1;
|
||||||
#endif
|
#endif
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
FD_ZERO(&fds);
|
||||||
|
FD_SET(fd, &fds);
|
||||||
|
#if defined(__linux__)
|
||||||
|
if (_glfw.linjs.inotify > 0)
|
||||||
|
FD_SET(_glfw.linjs.inotify, &fds);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (timeout)
|
if (timeout)
|
||||||
{
|
{
|
||||||
const long seconds = (long) *timeout;
|
const long seconds = (long) *timeout;
|
||||||
|
Loading…
Reference in New Issue
Block a user