[Scummvm-git-logs] scummvm master -> 097d819236dbe8e84b852022d224a8a813ada396
sev-
noreply at scummvm.org
Tue Nov 21 16:24:53 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
097d819236 Revert "COMMON: Fixed order of loading zip packs"
Commit: 097d819236dbe8e84b852022d224a8a813ada396
https://github.com/scummvm/scummvm/commit/097d819236dbe8e84b852022d224a8a813ada396
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-11-21T17:24:20+01:00
Commit Message:
Revert "COMMON: Fixed order of loading zip packs"
This reverts commit 57c87b4b50fdb52c9aa36e29b5aaa3290e541fc6.
It appears to be incorrect and breaks the icon updates.
Changed paths:
common/zip-set.cpp
diff --git a/common/zip-set.cpp b/common/zip-set.cpp
index 64c2df3acea..8e45e00d1d2 100644
--- a/common/zip-set.cpp
+++ b/common/zip-set.cpp
@@ -29,14 +29,36 @@ namespace Common {
struct ArchiveMemberListBackComparator {
bool operator()(const ArchiveMemberPtr &a, const ArchiveMemberPtr &b) {
- return a->getName() < b->getName();
+ return a->getName() > b->getName();
}
};
bool generateZipSet(SearchSet &searchSet, const char *defaultFile, const char *packsMask, const char *packsPath) {
- Archive *dat = nullptr;
+ Archive *dat;
bool changed = false;
+ if (!ConfMan.get(packsPath).empty()) {
+ FSDirectory *iconDir = new FSDirectory(ConfMan.get(packsPath));
+ ArchiveMemberList iconFiles;
+
+ iconDir->listMatchingMembers(iconFiles, packsMask);
+ sort(iconFiles.begin(), iconFiles.end(), ArchiveMemberListBackComparator());
+
+ for (ArchiveMemberList::iterator ic = iconFiles.begin(); ic != iconFiles.end(); ++ic) {
+ dat = makeZipArchive((*ic)->createReadStream());
+
+ if (dat) {
+ searchSet.add((*ic)->getName(), dat);
+ changed = true;
+ debug(2, "generateZipSet: Loaded pack file: %s", (*ic)->getName().c_str());
+ }
+ }
+
+ delete iconDir;
+ }
+
+ dat = nullptr;
+
if (ConfMan.hasKey("themepath")) {
FSNode *fs = new FSNode(normalizePath(ConfMan.get("themepath") + "/" + defaultFile, '/'));
if (fs->exists()) {
@@ -73,28 +95,6 @@ bool generateZipSet(SearchSet &searchSet, const char *defaultFile, const char *p
debug(2, "generateZipSet: Loaded pack file: %s", defaultFile);
}
- dat = nullptr;
-
- if (!ConfMan.get(packsPath).empty()) {
- FSDirectory *iconDir = new FSDirectory(ConfMan.get(packsPath));
- ArchiveMemberList iconFiles;
-
- iconDir->listMatchingMembers(iconFiles, packsMask);
- sort(iconFiles.begin(), iconFiles.end(), ArchiveMemberListBackComparator());
-
- for (ArchiveMemberList::iterator ic = iconFiles.begin(); ic != iconFiles.end(); ++ic) {
- dat = makeZipArchive((*ic)->createReadStream());
-
- if (dat) {
- searchSet.add((*ic)->getName(), dat);
- changed = true;
- debug(2, "generateZipSet: Loaded pack file: %s", (*ic)->getName().c_str());
- }
- }
-
- delete iconDir;
- }
-
return changed;
}
More information about the Scummvm-git-logs
mailing list