From 8f04ad05ae78626fb207854fac63722a985ecb8a Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Mon, 20 May 2024 15:05:30 +0200 Subject: [PATCH] Warn if user overrode the SDL video driver hint --- src/main/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/main.cpp b/src/main/main.cpp index a52e78c..42b382f 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -138,6 +138,10 @@ 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 \"%s\". Only X11 is supported on Linux.\n", SDL_GetCurrentVideoDriver()); + } + return ultramodern::WindowHandle{ wmInfo.info.x11.display, wmInfo.info.x11.window }; #else static_assert(false && "Unimplemented");