From 970ed36de5c031bad762ecd737ce5f03a17203b5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 9 Jan 2024 11:56:26 -0800 Subject: [PATCH] Only force X11 if SDL_VIDEO_DRIVER_X11 is available --- src/video/SDL_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index a1f88acfe..022d8ad9c 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -469,7 +469,7 @@ int SDL_VideoInit(const char *driver_name) if (!driver_name) { driver_name = SDL_GetHint(SDL_HINT_VIDEODRIVER); } -#ifdef __LINUX__ +#if defined(__LINUX__) && defined(SDL_VIDEO_DRIVER_X11) if (!driver_name) { /* See if it looks like we need X11 */ SDL_bool force_x11 = SDL_FALSE;