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