[Scummvm-git-logs] scummvm master -> 75c7975222bf6a71fac158ff13d6f5dccdb8006f
lephilousophe
noreply at scummvm.org
Thu Aug 29 16:02:21 UTC 2024
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:
75c7975222 AGS: Don't store file path, only its text representation
Commit: 75c7975222bf6a71fac158ff13d6f5dccdb8006f
https://github.com/scummvm/scummvm/commit/75c7975222bf6a71fac158ff13d6f5dccdb8006f
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-08-29T18:02:04+02:00
Commit Message:
AGS: Don't store file path, only its text representation
The member variable is needed because we use the underlying string
buffer to create the fallback entry.
The path in itself is not needed.
Changed paths:
engines/ags/detection.cpp
engines/ags/detection.h
diff --git a/engines/ags/detection.cpp b/engines/ags/detection.cpp
index 77ab51c4cd8..90bcef3f8ee 100644
--- a/engines/ags/detection.cpp
+++ b/engines/ags/detection.cpp
@@ -159,7 +159,6 @@ ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, c
continue;
if (AGS3::isAGSFile(f)) {
- _filename = filename;
f.seek(0);
_md5 = Common::computeStreamMD5AsString(f, 5000);
@@ -178,14 +177,14 @@ ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, c
AGS::g_fallbackDesc.desc.gameId = _gameid.c_str();
AGS::g_fallbackDesc.desc.extra = _extra.c_str();
- _filenameStr = _filename.toString('/');
+ _filenameStr = filename.toString('/');
AGS::g_fallbackDesc.desc.filesDescriptions[0].fileName = _filenameStr.c_str();
AGS::g_fallbackDesc.desc.filesDescriptions[0].fileSize = (f.size() >= 0xffffffff) ? AD_NO_SIZE : f.size();
AGS::g_fallbackDesc.desc.filesDescriptions[0].md5 = _md5.c_str();
ADDetectedGame game(&AGS::g_fallbackDesc.desc);
- game.matchedFiles[_filename].md5 = _md5;
- game.matchedFiles[_filename].size = f.size();
+ game.matchedFiles[filename].md5 = _md5;
+ game.matchedFiles[filename].size = f.size();
game.hasUnknownFiles = hasUnknownFiles;
return game;
diff --git a/engines/ags/detection.h b/engines/ags/detection.h
index fa1939c354f..63409024a1d 100644
--- a/engines/ags/detection.h
+++ b/engines/ags/detection.h
@@ -66,7 +66,6 @@ extern const AGSGameDescription GAME_DESCRIPTIONS[];
class AGSMetaEngineDetection : public AdvancedMetaEngineDetection<AGS::AGSGameDescription> {
mutable Common::String _gameid;
mutable Common::String _extra;
- mutable Common::Path _filename;
mutable Common::String _filenameStr;
mutable Common::String _md5;
More information about the Scummvm-git-logs
mailing list