mirror of
https://github.com/glfw/glfw.git
synced 2025-12-15 11:43:13 +00:00
Code cleanup and simplification
This commit is contained in:
parent
e917b77539
commit
6cdfa97ca5
@ -1406,16 +1406,12 @@ static void handleEvents(double* timeout)
|
||||
return;
|
||||
}
|
||||
|
||||
if(event)
|
||||
{
|
||||
double notimeout = 0.0;
|
||||
if (!_glfwPollPOSIX(fds, sizeof(fds) / sizeof(fds[0]), ¬imeout))
|
||||
{
|
||||
wl_display_cancel_read(_glfw.wl.display);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (!_glfwPollPOSIX(fds, sizeof(fds) / sizeof(fds[0]), timeout))
|
||||
double* ptimeout = timeout;
|
||||
double notimeout = 0.0;
|
||||
if (event)
|
||||
ptimeout = ¬imeout; // do not wait if we already have an event
|
||||
|
||||
if (!_glfwPollPOSIX(fds, sizeof(fds) / sizeof(fds[0]), ptimeout))
|
||||
{
|
||||
wl_display_cancel_read(_glfw.wl.display);
|
||||
return;
|
||||
@ -1433,8 +1429,6 @@ static void handleEvents(double* timeout)
|
||||
else
|
||||
{
|
||||
fds[DISPLAY_FD].fd = -1; // ignore wl events
|
||||
//fds[LIBDECOR_FD].fd = -1;
|
||||
//fds[CURSOR_FD].fd = -1;
|
||||
double notimeout = 0.0;
|
||||
if (!_glfwPollPOSIX(fds, sizeof(fds) / sizeof(fds[0]), ¬imeout))
|
||||
{
|
||||
@ -1462,7 +1456,6 @@ static void handleEvents(double* timeout)
|
||||
|
||||
event = GLFW_TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user