diff --git a/glfw/input.c b/glfw/input.c index 2d48810ac..d2704a07a 100644 --- a/glfw/input.c +++ b/glfw/input.c @@ -32,7 +32,6 @@ #include #include #include -#include // Internal key state used for sticky keys #define _GLFW_STICK 3 @@ -1176,7 +1175,9 @@ GLFWAPI int glfwUpdateGamepadMappings(const char* string) while (*c) { - if (isxdigit(*c)) + if ((*c >= '0' && *c <= '9') || + (*c >= 'a' && *c <= 'f') || + (*c >= 'A' && *c <= 'F')) { char line[1024]; diff --git a/glfw/win32_platform.h b/glfw/win32_platform.h index 9a669215f..598151468 100644 --- a/glfw/win32_platform.h +++ b/glfw/win32_platform.h @@ -242,7 +242,9 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)( #include "egl_context.h" #include "osmesa_context.h" -#define _GLFW_WNDCLASSNAME L"GLFW30" +#if !defined(_GLFW_WNDCLASSNAME) + #define _GLFW_WNDCLASSNAME L"GLFW30" +#endif #define _glfw_dlopen(name) LoadLibraryA(name) #define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle) diff --git a/glfw/x11_window.c b/glfw/x11_window.c index 63ad189fd..39ea13577 100644 --- a/glfw/x11_window.c +++ b/glfw/x11_window.c @@ -2539,8 +2539,9 @@ void _glfwPlatformPollEvents(void) #if defined(__linux__) _glfwDetectJoystickConnectionLinux(); #endif - int count = XPending(_glfw.x11.display); - while (count--) + XPending(_glfw.x11.display); + + while (XQLength(_glfw.x11.display)) { XEvent event; XNextEvent(_glfw.x11.display, &event);