diff options
| author | Johannes Schickel | 2008-11-20 18:25:22 +0000 | 
|---|---|---|
| committer | Johannes Schickel | 2008-11-20 18:25:22 +0000 | 
| commit | 4368081c555a2eda46e8b0743761bbe2db607da8 (patch) | |
| tree | eba3ea2aac9e178864119c3672ca2456afe17997 /gui | |
| parent | 398fdab2765d769479b1060548f9205f860750a5 (diff) | |
| download | scummvm-rg350-4368081c555a2eda46e8b0743761bbe2db607da8.tar.gz scummvm-rg350-4368081c555a2eda46e8b0743761bbe2db607da8.tar.bz2 scummvm-rg350-4368081c555a2eda46e8b0743761bbe2db607da8.zip  | |
Fixed ZipArchive/FSDirectory creation.
svn-id: r35133
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/ThemeEngine.cpp | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index ace3114f63..90ab2e211f 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -398,9 +398,8 @@ bool ThemeEngine::addFont(const Common::String &fontId, const Common::String &fi  }  bool ThemeEngine::addBitmap(const Common::String &filename) { -	if (_bitmaps.contains(filename)) { +	if (_bitmaps.contains(filename))  		ImageMan.unregisterSurface(filename); -	}  	ImageMan.registerSurface(filename, 0);  	_bitmaps[filename] = ImageMan.getSurface(filename); @@ -1070,9 +1069,11 @@ const Graphics::Font *ThemeEngine::loadFontFromArchive(const Common::String &fil  	Common::Archive *arch = 0;  	const Graphics::NewFont *font = 0; -	if (getThemeFileName().hasSuffix(".zip")) { +	Common::FSNode node(getThemeFileName()); + +	if (node.getName().hasSuffix(".zip")) {  #ifdef USE_ZLIB -		Common::ZipArchive *zip = new Common::ZipArchive(getThemeFileName()); +		Common::ZipArchive *zip = new Common::ZipArchive(node);  		if (!zip || !zip->isOpen())  			return 0; @@ -1081,7 +1082,7 @@ const Graphics::Font *ThemeEngine::loadFontFromArchive(const Common::String &fil  		return 0;  #endif  	} else { -		Common::FSDirectory *dir = new Common::FSDirectory(getThemeFileName()); +		Common::FSDirectory *dir = new Common::FSDirectory(node);  		if (!dir || !dir->getFSNode().isDirectory())	  			return 0;  | 
