This commit is contained in:
Camilla Löwy 2017-08-16 21:03:10 +02:00
parent ac01da6953
commit 0d9e71fe81
3 changed files with 5 additions and 6 deletions

View File

@ -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");
}

View File

@ -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 {

View File

@ -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,