Commit 61620ceb authored by bitplane's avatar bitplane

fixed a bug when trying to load fonts with uppercase letters in their names in...

fixed a bug when trying to load fonts with uppercase letters in their names in case sensitive filesystems

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@719 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 125c58df
...@@ -162,6 +162,8 @@ GUI: ...@@ -162,6 +162,8 @@ GUI:
- Fixed a bug in clear() when an element was hovered or had focus - Fixed a bug in clear() when an element was hovered or had focus
- Fixed a bug when loading fonts with uppercase letters in the name in case-sensitive filesystems
GUI Editor: GUI Editor:
- Added cut/copy/paste using clipboard and xml (via memory file). Will have problems in Linux due - Added cut/copy/paste using clipboard and xml (via memory file). Will have problems in Linux due
......
...@@ -1175,13 +1175,13 @@ IGUIFont* CGUIEnvironment::getFont(const c8* filename) ...@@ -1175,13 +1175,13 @@ IGUIFont* CGUIEnvironment::getFont(const c8* filename)
// does the file exist? // does the file exist?
if (!FileSystem->existFile(f.Filename.c_str())) if (!FileSystem->existFile(filename))
{ {
os::Printer::log("Could not load font because the file does not exist", f.Filename.c_str(), ELL_ERROR); os::Printer::log("Could not load font because the file does not exist", f.Filename.c_str(), ELL_ERROR);
return 0; return 0;
} }
io::IXMLReader *xml = FileSystem->createXMLReader(f.Filename.c_str()); io::IXMLReader *xml = FileSystem->createXMLReader(filename);
if (xml) if (xml)
{ {
// this is an XML font, but we need to know what type // this is an XML font, but we need to know what type
...@@ -1211,7 +1211,7 @@ IGUIFont* CGUIEnvironment::getFont(const c8* filename) ...@@ -1211,7 +1211,7 @@ IGUIFont* CGUIEnvironment::getFont(const c8* filename)
if (t==EGFT_BITMAP) if (t==EGFT_BITMAP)
{ {
CGUIFont* font = new CGUIFont(this, f.Filename.c_str()); CGUIFont* font = new CGUIFont(this, filename);
ifont = (IGUIFont*)font; ifont = (IGUIFont*)font;
// change working directory, for loading textures // change working directory, for loading textures
core::stringc workingDir = FileSystem->getWorkingDirectory(); core::stringc workingDir = FileSystem->getWorkingDirectory();
......
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