From 1423c3c6b1e7981913a8ccb9a3017b5b4af70132 Mon Sep 17 00:00:00 2001 From: Reonu Date: Mon, 27 May 2024 00:34:16 +0100 Subject: [PATCH] potential dumb fix for X11 issue --- src/main/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/main.cpp b/src/main/main.cpp index 47630ad..e2ca1f9 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -139,8 +139,8 @@ ultramodern::WindowHandle create_window(ultramodern::gfx_callbacks_t::gfx_data_t #elif defined(__ANDROID__) static_assert(false && "Unimplemented"); #elif defined(__linux__) - if (wmInfo.subsystem != SDL_SYSWM_X11) { - exit_error("Unsupported SDL2 video driver \"%d\". Only X11 is supported on Linux.\n", wmInfo.subsystem); + if (wmInfo.subsystem != SDL_SYSWM_X11 && SDL_GetCurrentVideoDriver() != "x11" && SDL_GetCurrentVideoDriver() != "X11") { + exit_error("Unsupported SDL2 video driver \"%s\". Only X11 is supported on Linux.\n", SDL_GetCurrentVideoDriver()); } return ultramodern::WindowHandle{ wmInfo.info.x11.display, wmInfo.info.x11.window };