[Scummvm-git-logs] scummvm master -> e36a4be7ce1efd6c7fff6e3c1f3f583d2bc5c189
sluicebox
22204938+sluicebox at users.noreply.github.com
Sat Aug 31 03:02:49 CEST 2019
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:
e36a4be7ce SCI: Fix addAsVirtualFiles creating titles with no files
Commit: e36a4be7ce1efd6c7fff6e3c1f3f583d2bc5c189
https://github.com/scummvm/scummvm/commit/e36a4be7ce1efd6c7fff6e3c1f3f583d2bc5c189
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-08-30T18:00:25-07:00
Commit Message:
SCI: Fix addAsVirtualFiles creating titles with no files
Fixes QFG game titles appearing on import screens when no character
files exist but save files exist that match fileMask
Changed paths:
engines/sci/engine/file.cpp
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp
index 5821313..c311810 100644
--- a/engines/sci/engine/file.cpp
+++ b/engines/sci/engine/file.cpp
@@ -474,10 +474,9 @@ void DirSeeker::addAsVirtualFiles(Common::String title, Common::String fileMask)
// Sort all filenames alphabetically
Common::sort(foundFiles.begin(), foundFiles.end());
- _files.push_back(title);
- _virtualFiles.push_back("");
Common::StringArray::iterator it;
Common::StringArray::iterator it_end = foundFiles.end();
+ bool titleAdded = false;
for (it = foundFiles.begin(); it != it_end; it++) {
Common::String regularFilename = *it;
@@ -488,6 +487,13 @@ void DirSeeker::addAsVirtualFiles(Common::String title, Common::String fileMask)
delete testfile;
if (testfileSize > 1024) // check, if larger than 1k. in that case its a saved game.
continue; // and we dont want to have those in the list
+
+ if (!titleAdded) {
+ _files.push_back(title);
+ _virtualFiles.push_back("");
+ titleAdded = true;
+ }
+
// We need to remove the prefix for display purposes
_files.push_back(wrappedFilename);
// but remember the actual name as well
More information about the Scummvm-git-logs
mailing list