mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Cleanup
This commit is contained in:
parent
ac01da6953
commit
0d9e71fe81
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user