Commit 6abb6f14 authored by bitplane's avatar bitplane

Fix console device for with no video drivers or GUI (ie for texture/mesh...

Fix console device for with no video drivers or GUI (ie for texture/mesh manipulation without rendering)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2298 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 1125b617
...@@ -131,6 +131,9 @@ CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params) ...@@ -131,6 +131,9 @@ CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params)
case video::EDT_OPENGL: case video::EDT_OPENGL:
os::Printer::log("The console device cannot use hardware drivers", ELL_ERROR); os::Printer::log("The console device cannot use hardware drivers", ELL_ERROR);
break; break;
case video::EDT_NULL:
VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize);
break;
default: default:
break; break;
} }
...@@ -154,12 +157,15 @@ CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params) ...@@ -154,12 +157,15 @@ CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params)
{ {
createGUIAndScene(); createGUIAndScene();
#ifdef _IRR_USE_CONSOLE_FONT_ #ifdef _IRR_USE_CONSOLE_FONT_
ConsoleFont = new gui::CGUIConsoleFont(this); if (GUIEnvironment)
gui::IGUISkin *skin = GUIEnvironment->getSkin();
if (skin)
{ {
for (u32 i=0; i < gui::EGDF_COUNT; ++i) ConsoleFont = new gui::CGUIConsoleFont(this);
skin->setFont(ConsoleFont, gui::EGUI_DEFAULT_FONT(i)); gui::IGUISkin *skin = GUIEnvironment->getSkin();
if (skin)
{
for (u32 i=0; i < gui::EGDF_COUNT; ++i)
skin->setFont(ConsoleFont, gui::EGUI_DEFAULT_FONT(i));
}
} }
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment