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
master
bitplane 2007-06-18 04:58:12 +00:00
parent 125c58dfda
commit 61620cebff
2 changed files with 5 additions and 3 deletions

View File

@ -162,6 +162,8 @@ GUI:
- 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:
- Added cut/copy/paste using clipboard and xml (via memory file). Will have problems in Linux due

View File

@ -1175,13 +1175,13 @@ IGUIFont* CGUIEnvironment::getFont(const c8* filename)
// 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);
return 0;
}
io::IXMLReader *xml = FileSystem->createXMLReader(f.Filename.c_str());
io::IXMLReader *xml = FileSystem->createXMLReader(filename);
if (xml)
{
// this is an XML font, but we need to know what type
@ -1211,7 +1211,7 @@ IGUIFont* CGUIEnvironment::getFont(const c8* filename)
if (t==EGFT_BITMAP)
{
CGUIFont* font = new CGUIFont(this, f.Filename.c_str());
CGUIFont* font = new CGUIFont(this, filename);
ifont = (IGUIFont*)font;
// change working directory, for loading textures
core::stringc workingDir = FileSystem->getWorkingDirectory();