From 5a47ddca33446d85b35ddc5c4043d8d6d1de1ede Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 2 Jun 2024 14:01:54 -0500 Subject: [PATCH] Use EGL on X11 for non-x86 platforms In theory we could do this everywhere, but I'd rather not risk major behavior changes on x86 right before a release. --- app/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 2e74c8b7..a71e512f 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -420,6 +420,13 @@ int main(int argc, char *argv[]) #endif } +#if !defined(Q_PROCESSOR_X86) && defined(SDL_HINT_VIDEO_X11_FORCE_EGL) + // Some ARM and RISC-V embedded devices don't have working GLX which can cause + // SDL to fail to find a working OpenGL implementation at all. Let's force EGL + // on non-x86 platforms, since GLX is deprecated anyway. + SDL_SetHint(SDL_HINT_VIDEO_X11_FORCE_EGL, "1"); +#endif + #ifdef Q_OS_MACOS // This avoids using the default keychain for SSL, which may cause // password prompts on macOS.