[Scummvm-git-logs] scummvm branch-2-7 -> a954d49bab60f02bc93ef218fe56b4256f488cd5

lephilousophe noreply at scummvm.org
Tue Jul 11 06:04:14 UTC 2023


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7525e2cf39 COMMON: Add createReadStreamForMemberNext for the ease of using patcher archives
a954d49bab NEWS: Added libretro fix


Commit: 7525e2cf394fcf318e5260ecf920e1c87589317e
    https://github.com/scummvm/scummvm/commit/7525e2cf394fcf318e5260ecf920e1c87589317e
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-07-11T07:36:12+02:00

Commit Message:
COMMON: Add createReadStreamForMemberNext for the ease of using patcher archives

Changed paths:
    common/archive.cpp
    common/archive.h


diff --git a/common/archive.cpp b/common/archive.cpp
index bea7e2093d4..47bf33d8978 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -314,6 +314,24 @@ SeekableReadStream *SearchSet::createReadStreamForMember(const Path &path) const
 	return nullptr;
 }
 
+SeekableReadStream *SearchSet::createReadStreamForMemberNext(const Path &path, const Archive *starting) const {
+	if (path.empty())
+		return nullptr;
+
+	ArchiveNodeList::const_iterator it = _list.begin();
+	for (; it != _list.end(); ++it)
+		if (it->_arc == starting) {
+			++it;
+			break;
+		}
+	for (; it != _list.end(); ++it) {
+		SeekableReadStream *stream = it->_arc->createReadStreamForMember(path);
+		if (stream)
+			return stream;
+	}
+
+	return nullptr;
+}
 
 SearchManager::SearchManager() {
 	clear(); // Force a reset
diff --git a/common/archive.h b/common/archive.h
index 09d56146605..0a89db4bb76 100644
--- a/common/archive.h
+++ b/common/archive.h
@@ -142,6 +142,14 @@ public:
 	 * @return The newly created input stream.
 	 */
 	virtual SeekableReadStream *createReadStreamForMember(const Path &path) const = 0;
+
+	/**
+	 * For most archives: same as previous. For SearchSet see SearchSet
+	 * documentation.
+	 */
+	virtual SeekableReadStream *createReadStreamForMemberNext(const Path &path, const Archive *starting) const {
+		return createReadStreamForMember(path);
+	}
 };
 
 class MemcachingCaseInsensitiveArchive;
@@ -334,6 +342,11 @@ public:
 	 */
 	SeekableReadStream *createReadStreamForMember(const Path &path) const override;
 
+	/**
+	 * Similar to above but exclude matches from archives before starting and starting itself.
+	 */
+	SeekableReadStream *createReadStreamForMemberNext(const Path &path, const Archive *starting) const override;
+
 	/**
 	 * Ignore clashes when adding directories. For more details, see the corresponding parameter
 	 * in @ref FSDirectory documentation.


Commit: a954d49bab60f02bc93ef218fe56b4256f488cd5
    https://github.com/scummvm/scummvm/commit/a954d49bab60f02bc93ef218fe56b4256f488cd5
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-07-11T08:02:40+02:00

Commit Message:
NEWS: Added libretro fix

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index 102cbdd4859..51eccfb1627 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -7,6 +7,7 @@ For a more comprehensive changelog of the latest experimental code, see:
   - Fixed playback speed for Theora videos.
   - Added scummvm.log file viewer.
   - Exposed ScummVM debug level in the GUI (Misc tab).
+  - Fixed shader scaler loading failing in certain conditions.
 
  AGI:
    - Restored possibility to pick arbitrary render mode in Game Options.




More information about the Scummvm-git-logs mailing list