Move internals to shared joystick objects

Preparation for gamecontrollerdb support and the gamepad API.
This commit is contained in:
Camilla Löwy
2017-01-05 19:44:15 +01:00
parent 43c1910453
commit bfd564f257
10 changed files with 619 additions and 753 deletions
+4 -4
View File
@@ -62,10 +62,10 @@ static GLFWbool waitForEvent(double* timeout)
FD_ZERO(&fds);
FD_SET(fd, &fds);
#if defined(__linux__)
FD_SET(_glfw.linux_js.inotify, &fds);
FD_SET(_glfw.linjs.inotify, &fds);
if (fd < _glfw.linux_js.inotify)
count = _glfw.linux_js.inotify + 1;
if (fd < _glfw.linjs.inotify)
count = _glfw.linjs.inotify + 1;
#endif
for (;;)
{
@@ -2153,7 +2153,7 @@ void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
void _glfwPlatformPollEvents(void)
{
_glfwPollJoystickEvents();
_glfwDetectJoystickConnectionLinux();
int count = XPending(_glfw.x11.display);
while (count--)