mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 16:30:45 +00:00
Add conditional compilation for platform units
This is a step towards being able to compile GLFW manually without needing to duplicate a lot of platform- or OS-specific logic.
This commit is contained in:
+6
-2
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
#if defined(_GLFW_X11)
|
||||
|
||||
#include <X11/cursorfont.h>
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
@@ -86,7 +88,7 @@ static GLFWbool waitForAnyEvent(double* timeout)
|
||||
{ _glfw.x11.emptyEventPipe[0], POLLIN }
|
||||
};
|
||||
|
||||
#if defined(__linux__)
|
||||
#if defined(_GLFW_LINUX_JOYSTICK)
|
||||
if (_glfw.joysticksInitialized)
|
||||
fds[count++] = (struct pollfd) { _glfw.linjs.inotify, POLLIN };
|
||||
#endif
|
||||
@@ -2781,7 +2783,7 @@ void _glfwPollEventsX11(void)
|
||||
{
|
||||
drainEmptyEvents();
|
||||
|
||||
#if defined(__linux__)
|
||||
#if defined(_GLFW_LINUX_JOYSTICK)
|
||||
if (_glfw.joysticksInitialized)
|
||||
_glfwDetectJoystickConnectionLinux();
|
||||
#endif
|
||||
@@ -3349,3 +3351,5 @@ GLFWAPI const char* glfwGetX11SelectionString(void)
|
||||
return getSelectionString(_glfw.x11.PRIMARY);
|
||||
}
|
||||
|
||||
#endif // _GLFW_X11
|
||||
|
||||
|
||||
Reference in New Issue
Block a user