1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00
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); _glfw.x11.x11xcb.handle = dlopen("libX11-xcb.so.1", RTLD_LAZY | RTLD_GLOBAL);
if (_glfw.x11.x11xcb.handle) if (_glfw.x11.x11xcb.handle)
{ {
_glfw.x11.x11xcb.XGetXCBConnection = (PFN_XGetXCBConnection) _glfw.x11.x11xcb.GetXCBConnection = (PFN_XGetXCBConnection)
dlsym(_glfw.x11.x11xcb.handle, "XGetXCBConnection"); dlsym(_glfw.x11.x11xcb.handle, "XGetXCBConnection");
} }

View File

@ -100,6 +100,7 @@ typedef XID xcb_window_t;
typedef XID xcb_visualid_t; typedef XID xcb_visualid_t;
typedef struct xcb_connection_t xcb_connection_t; typedef struct xcb_connection_t xcb_connection_t;
typedef xcb_connection_t* (* PFN_XGetXCBConnection)(Display*); typedef xcb_connection_t* (* PFN_XGetXCBConnection)(Display*);
#define XGetXCBConnection _glfw.x11.x11xcb.GetXCBConnection
typedef Bool (* PFN_XF86VidModeQueryExtension)(Display*,int*,int*); typedef Bool (* PFN_XF86VidModeQueryExtension)(Display*,int*,int*);
typedef Bool (* PFN_XF86VidModeGetGammaRamp)(Display*,int,int,unsigned short*,unsigned short*,unsigned short*); typedef Bool (* PFN_XF86VidModeGetGammaRamp)(Display*,int,int,unsigned short*,unsigned short*,unsigned short*);
@ -345,7 +346,7 @@ typedef struct _GLFWlibraryX11
struct { struct {
void* handle; void* handle;
PFN_XGetXCBConnection XGetXCBConnection; PFN_XGetXCBConnection GetXCBConnection;
} x11xcb; } x11xcb;
struct { struct {

View File

@ -2705,8 +2705,7 @@ int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
return GLFW_FALSE; return GLFW_FALSE;
} }
xcb_connection_t* connection = xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display);
_glfw.x11.x11xcb.XGetXCBConnection(_glfw.x11.display);
if (!connection) if (!connection)
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_PLATFORM_ERROR,
@ -2749,8 +2748,7 @@ VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
VkXcbSurfaceCreateInfoKHR sci; VkXcbSurfaceCreateInfoKHR sci;
PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR;
xcb_connection_t* connection = xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display);
_glfw.x11.x11xcb.XGetXCBConnection(_glfw.x11.display);
if (!connection) if (!connection)
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_PLATFORM_ERROR,