From 688debb6435103f5944330120da456732b246804 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 21 Apr 2021 17:34:10 +0200 Subject: [PATCH] CIrrDeviceLinux: don't create input context if no window This broke the Null driver. --- source/Irrlicht/CIrrDeviceLinux.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index ec3a5259..f2970891 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -148,6 +148,9 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) if (!createWindow()) return; setResizable(param.WindowResizable); +#ifdef _IRR_COMPILE_WITH_X11_ + createInputContext(); +#endif } // create cursor control @@ -159,10 +162,6 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) if (!VideoDriver) return; -#ifdef _IRR_COMPILE_WITH_X11_ - createInputContext(); -#endif - createGUIAndScene(); }