diff options
author | Robert Špalek | 2010-06-29 06:38:00 +0000 |
---|---|---|
committer | Robert Špalek | 2010-06-29 06:38:00 +0000 |
commit | 5e030bebcc8e1a1cf918559c729039fc50a470e7 (patch) | |
tree | c5bfc4ec5310150c38330a9d71fb509f77bd0b91 | |
parent | 02fb3f88e22b8d11a080bbf3a4db624d97d4bd37 (diff) | |
download | scummvm-rg350-5e030bebcc8e1a1cf918559c729039fc50a470e7.tar.gz scummvm-rg350-5e030bebcc8e1a1cf918559c729039fc50a470e7.tar.bz2 scummvm-rg350-5e030bebcc8e1a1cf918559c729039fc50a470e7.zip |
enable reading ZIP archives even without USE_ZLIB
our module unzip.cpp can read uncompressed ZIP archives even without zlib. if some of the files
inside are compressed and zlib is not linked in, an error is returned.
svn-id: r50483
-rw-r--r-- | backends/vkeybd/virtual-keyboard.cpp | 2 | ||||
-rw-r--r-- | gui/ThemeEngine.cpp | 9 |
2 files changed, 0 insertions, 11 deletions
diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp index bd512fe3ad..2c88322191 100644 --- a/backends/vkeybd/virtual-keyboard.cpp +++ b/backends/vkeybd/virtual-keyboard.cpp @@ -90,7 +90,6 @@ bool VirtualKeyboard::openPack(const String &packName, const FSNode &node) { return true; } -#ifdef USE_ZLIB if (node.getChild(packName + ".zip").exists()) { // compressed keyboard pack _fileArchive = makeZipArchive(node.getChild(packName + ".zip")); @@ -109,7 +108,6 @@ bool VirtualKeyboard::openPack(const String &packName, const FSNode &node) { return true; } -#endif return false; } diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 0691f8351d..30bacbb617 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -397,17 +397,12 @@ bool ThemeEngine::init() { if (!_themeArchive && !_themeFile.empty()) { Common::FSNode node(_themeFile); if (node.getName().hasSuffix(".zip") && !node.isDirectory()) { -#ifdef USE_ZLIB Common::Archive *zipArchive = Common::makeZipArchive(node); if (!zipArchive) { warning("Failed to open Zip archive '%s'.", node.getPath().c_str()); } _themeArchive = zipArchive; -#else - warning("Trying to load theme '%s' in a Zip archive without zLib support", _themeFile.c_str()); - return false; -#endif } else if (node.isDirectory()) { _themeArchive = new Common::FSDirectory(node); } @@ -1563,7 +1558,6 @@ bool ThemeEngine::themeConfigUsable(const Common::FSNode &node, Common::String & bool foundHeader = false; if (node.getName().hasSuffix(".zip") && !node.isDirectory()) { -#ifdef USE_ZLIB Common::Archive *zipArchive = Common::makeZipArchive(node); if (zipArchive && zipArchive->hasFile("THEMERC")) { // Open THEMERC from the ZIP file. @@ -1576,7 +1570,6 @@ bool ThemeEngine::themeConfigUsable(const Common::FSNode &node, Common::String & // reference to zipArchive anywhere. This could change if we // ever modify ZipArchive::createReadStreamForMember. delete zipArchive; -#endif } else if (node.isDirectory()) { Common::FSNode headerfile = node.getChild("THEMERC"); if (!headerfile.exists() || !headerfile.isReadable() || headerfile.isDirectory()) @@ -1672,7 +1665,6 @@ void ThemeEngine::listUsableThemes(const Common::FSNode &node, Common::List<Them } Common::FSList fileList; -#ifdef USE_ZLIB // Check all files. We need this to find all themes inside ZIP archives. if (!node.getChildren(fileList, Common::FSNode::kListFilesOnly)) return; @@ -1699,7 +1691,6 @@ void ThemeEngine::listUsableThemes(const Common::FSNode &node, Common::List<Them } fileList.clear(); -#endif // Check if we exceeded the given recursion depth if (depth - 1 == -1) |