Kaynağa Gözat

Renamed config macro to match convention.

Camilla Berglund 13 yıl önce
ebeveyn
işleme
64c677be9e
4 değiştirilmiş dosya ile 13 ekleme ve 13 silme
  1. 1 1
      CMakeLists.txt
  2. 1 1
      src/config.h.in
  3. 1 1
      src/x11_init.c
  4. 10 10
      src/x11_joystick.c

+ 1 - 1
CMakeLists.txt

@@ -184,7 +184,7 @@ if (_GLFW_X11_GLX)
     endif()
 
     if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-        set(_GLFW_USE_LINUX_JOYSTICKS 1)
+        set(_GLFW_HAS_LINUX_JOYSTICKS 1)
     endif()
 endif()
 

+ 1 - 1
src/config.h.in

@@ -64,7 +64,7 @@
 #cmakedefine _GLFW_HAS_GLXGETPROCADDRESSEXT
 
 // Define this to 1 if the Linux joystick API is available
-#cmakedefine _GLFW_USE_LINUX_JOYSTICKS
+#cmakedefine _GLFW_HAS_LINUX_JOYSTICKS
 
 // The GLFW version as used by glfwGetVersionString
 #define _GLFW_VERSION_FULL "@GLFW_VERSION_FULL@"

+ 1 - 1
src/x11_init.c

@@ -719,7 +719,7 @@ const char* _glfwPlatformGetVersionString(void)
 #if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)
         " clock_gettime"
 #endif
-#if defined(_GLFW_USE_LINUX_JOYSTICKS)
+#if defined(_GLFW_HAS_LINUX_JOYSTICKS)
         " Linux-joystick-API"
 #else
         " no-joystick-support"

+ 10 - 10
src/x11_joystick.c

@@ -30,7 +30,7 @@
 
 #include "internal.h"
 
-#ifdef _GLFW_USE_LINUX_JOYSTICKS
+#ifdef _GLFW_HAS_LINUX_JOYSTICKS
 #include <linux/joystick.h>
 
 #include <sys/types.h>
@@ -41,7 +41,7 @@
 #include <dirent.h>
 #include <stdio.h>
 #include <stdlib.h>
-#endif // _GLFW_USE_LINUX_JOYSTICKS
+#endif // _GLFW_HAS_LINUX_JOYSTICKS
 
 
 //========================================================================
@@ -50,7 +50,7 @@
 
 static int openJoystickDevice(int joy, const char* path)
 {
-#ifdef _GLFW_USE_LINUX_JOYSTICKS
+#ifdef _GLFW_HAS_LINUX_JOYSTICKS
     char numAxes, numButtons;
     int fd, version;
 
@@ -97,7 +97,7 @@ static int openJoystickDevice(int joy, const char* path)
     }
 
     _glfwLibrary.X11.joystick[joy].present = GL_TRUE;
-#endif // _GLFW_USE_LINUX_JOYSTICKS
+#endif // _GLFW_HAS_LINUX_JOYSTICKS
 
     return GL_TRUE;
 }
@@ -109,7 +109,7 @@ static int openJoystickDevice(int joy, const char* path)
 
 static void pollJoystickEvents(void)
 {
-#ifdef _GLFW_USE_LINUX_JOYSTICKS
+#ifdef _GLFW_HAS_LINUX_JOYSTICKS
     int i;
     ssize_t result;
     struct js_event e;
@@ -160,7 +160,7 @@ static void pollJoystickEvents(void)
             }
         }
     }
-#endif // _GLFW_USE_LINUX_JOYSTICKS
+#endif // _GLFW_HAS_LINUX_JOYSTICKS
 }
 
 
@@ -174,7 +174,7 @@ static void pollJoystickEvents(void)
 
 int _glfwInitJoysticks(void)
 {
-#ifdef _GLFW_USE_LINUX_JOYSTICKS
+#ifdef _GLFW_HAS_LINUX_JOYSTICKS
     int i, joy = 0;
     regex_t regex;
     DIR* dir;
@@ -215,7 +215,7 @@ int _glfwInitJoysticks(void)
     }
 
     regfree(&regex);
-#endif // _GLFW_USE_LINUX_JOYSTICKS
+#endif // _GLFW_HAS_LINUX_JOYSTICKS
 
     return GL_TRUE;
 }
@@ -227,7 +227,7 @@ int _glfwInitJoysticks(void)
 
 void _glfwTerminateJoysticks(void)
 {
-#ifdef _GLFW_USE_LINUX_JOYSTICKS
+#ifdef _GLFW_HAS_LINUX_JOYSTICKS
     int i;
 
     for (i = 0;  i <= GLFW_JOYSTICK_LAST;  i++)
@@ -241,7 +241,7 @@ void _glfwTerminateJoysticks(void)
             _glfwLibrary.X11.joystick[i].present = GL_FALSE;
         }
     }
-#endif // _GLFW_USE_LINUX_JOYSTICKS
+#endif // _GLFW_HAS_LINUX_JOYSTICKS
 }