From b49d0a607ed457599f00c682c3de670ebe58987d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 25 Aug 2023 19:45:45 -0400 Subject: [PATCH] x11: Avoid including full Vulkan headers. This dramatically improves compile times of the X11 backend. Reference Issue #8142. --- src/video/x11/SDL_x11video.c | 2 -- src/video/x11/SDL_x11vulkan.c | 1 + src/video/x11/SDL_x11vulkan.h | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c index 70cc85a35..5122bcf58 100644 --- a/src/video/x11/SDL_x11video.c +++ b/src/video/x11/SDL_x11video.c @@ -39,8 +39,6 @@ #include "SDL_x11opengles.h" #endif -#include "SDL_x11vulkan.h" - /* Initialization/Query functions */ static int X11_VideoInit(SDL_VideoDevice *_this); static void X11_VideoQuit(SDL_VideoDevice *_this); diff --git a/src/video/x11/SDL_x11vulkan.c b/src/video/x11/SDL_x11vulkan.c index e04c00721..6ab1c5ada 100644 --- a/src/video/x11/SDL_x11vulkan.c +++ b/src/video/x11/SDL_x11vulkan.c @@ -24,6 +24,7 @@ #include "SDL_x11video.h" +#include "../SDL_vulkan_internal.h" #include "SDL_x11vulkan.h" #include diff --git a/src/video/x11/SDL_x11vulkan.h b/src/video/x11/SDL_x11vulkan.h index f9b99101c..30b047e03 100644 --- a/src/video/x11/SDL_x11vulkan.h +++ b/src/video/x11/SDL_x11vulkan.h @@ -23,11 +23,11 @@ #ifndef SDL_x11vulkan_h_ #define SDL_x11vulkan_h_ -#include "../SDL_vulkan_internal.h" +#include #if defined(SDL_VIDEO_VULKAN) && defined(SDL_VIDEO_DRIVER_X11) -/*typedef struct xcb_connection_t xcb_connection_t;*/ +typedef struct xcb_connection_t xcb_connection_t; typedef xcb_connection_t *(*PFN_XGetXCBConnection)(Display *dpy); int X11_Vulkan_LoadLibrary(SDL_VideoDevice *_this, const char *path);