From bb7c06d32a134584826608d1c236a36878e36199 Mon Sep 17 00:00:00 2001 From: paradust7 <102263465+paradust7@users.noreply.github.com> Date: Sun, 10 Dec 2023 05:47:49 -0800 Subject: [PATCH] Initialize X11 thread safety --- source/Irrlicht/CIrrDeviceLinux.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index 3a7b7daa..3e4dcb8e 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -147,6 +147,11 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) // create keymap createKeyMap(); + // initialize X11 thread safety + // libX11 1.8+ has this on by default + // without it, multi-threaded GL drivers may crash + XInitThreads(); + // create window if (CreationParams.DriverType != video::EDT_NULL) {