Commit 787dc2f5 authored by bitplane's avatar bitplane

changed text "software device" to "software driver", fixed editbox crash when no font is available

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2236 dfc29bdd-3216-0410-991c-e03cc46cb475
parent b78345c7
......@@ -1158,10 +1158,14 @@ void CGUIEditBox::setTextRect(s32 line)
core::dimension2du d;
s32 lineCount = 1;
IGUIFont* font = OverrideFont;
IGUISkin* skin = Environment->getSkin();
if (!skin)
return;
IGUIFont* font = OverrideFont ? OverrideFont : skin->getFont();
if (!font)
font = skin->getFont();
return;
// get text dimension
if (WordWrap || MultiLine)
......@@ -1295,10 +1299,12 @@ void CGUIEditBox::calculateScrollPos()
if (!WordWrap)
{
// get cursor position
IGUIFont* font = OverrideFont;
IGUISkin* skin = Environment->getSkin();
if (!skin)
return;
IGUIFont* font = OverrideFont ? OverrideFont : skin->getFont();
if (!OverrideFont)
font = skin->getFont();
return;
core::stringw *txtLine = MultiLine ? &BrokenText[cursLine] : &Text;
s32 cPos = MultiLine ? CursorPos - BrokenTextPositions[cursLine] : CursorPos;
......
......@@ -858,7 +858,7 @@ void CSoftwareDriver::draw2DRectangle(const core::rect<s32>& pos,
//! driver, it would return "Direct3D8.1".
const wchar_t* CSoftwareDriver::getName() const
{
return L"Irrlicht Software Device 1.0";
return L"Irrlicht Software Driver 1.0";
}
......
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