CIrrDeviceLinux: don't create input context if no window

This broke the Null driver.
This commit is contained in:
sfan5 2021-04-21 17:34:10 +02:00
parent 21cb990e75
commit 688debb643

@ -148,6 +148,9 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)
if (!createWindow()) if (!createWindow())
return; return;
setResizable(param.WindowResizable); setResizable(param.WindowResizable);
#ifdef _IRR_COMPILE_WITH_X11_
createInputContext();
#endif
} }
// create cursor control // create cursor control
@ -159,10 +162,6 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)
if (!VideoDriver) if (!VideoDriver)
return; return;
#ifdef _IRR_COMPILE_WITH_X11_
createInputContext();
#endif
createGUIAndScene(); createGUIAndScene();
} }