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

View File

@ -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();
}