From 0d9e71fe811500d0006c32f38cd27ca582ba237c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 16 Aug 2017 21:03:10 +0200 Subject: [PATCH] Cleanup --- src/x11_init.c | 2 +- src/x11_platform.h | 3 ++- src/x11_window.c | 6 ++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/x11_init.c b/src/x11_init.c index d6e58bb5..f2c6ae06 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -647,7 +647,7 @@ static GLFWbool initExtensions(void) _glfw.x11.x11xcb.handle = dlopen("libX11-xcb.so.1", RTLD_LAZY | RTLD_GLOBAL); if (_glfw.x11.x11xcb.handle) { - _glfw.x11.x11xcb.XGetXCBConnection = (PFN_XGetXCBConnection) + _glfw.x11.x11xcb.GetXCBConnection = (PFN_XGetXCBConnection) dlsym(_glfw.x11.x11xcb.handle, "XGetXCBConnection"); } diff --git a/src/x11_platform.h b/src/x11_platform.h index 50cba346..48d15bc9 100644 --- a/src/x11_platform.h +++ b/src/x11_platform.h @@ -100,6 +100,7 @@ typedef XID xcb_window_t; typedef XID xcb_visualid_t; typedef struct xcb_connection_t xcb_connection_t; typedef xcb_connection_t* (* PFN_XGetXCBConnection)(Display*); +#define XGetXCBConnection _glfw.x11.x11xcb.GetXCBConnection typedef Bool (* PFN_XF86VidModeQueryExtension)(Display*,int*,int*); typedef Bool (* PFN_XF86VidModeGetGammaRamp)(Display*,int,int,unsigned short*,unsigned short*,unsigned short*); @@ -345,7 +346,7 @@ typedef struct _GLFWlibraryX11 struct { void* handle; - PFN_XGetXCBConnection XGetXCBConnection; + PFN_XGetXCBConnection GetXCBConnection; } x11xcb; struct { diff --git a/src/x11_window.c b/src/x11_window.c index da83fcf9..aee89d40 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -2705,8 +2705,7 @@ int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, return GLFW_FALSE; } - xcb_connection_t* connection = - _glfw.x11.x11xcb.XGetXCBConnection(_glfw.x11.display); + xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display); if (!connection) { _glfwInputError(GLFW_PLATFORM_ERROR, @@ -2749,8 +2748,7 @@ VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, VkXcbSurfaceCreateInfoKHR sci; PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; - xcb_connection_t* connection = - _glfw.x11.x11xcb.XGetXCBConnection(_glfw.x11.display); + xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display); if (!connection) { _glfwInputError(GLFW_PLATFORM_ERROR,