[Scummvm-git-logs] scummvm master -> 500ee6539abe7c20ad36fd7af671e3423d20a90a
criezy
criezy at scummvm.org
Wed Sep 1 11:39:02 UTC 2021
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:
4e3033cf74 AGS: Use case insensitive comparison for prefix in ResolveScriptPath
500ee6539a AGS: Do not add the prefix twice when saving bitmaps
Commit: 4e3033cf74b41a427cf13e6e0a3b9a12d9f7cfa8
https://github.com/scummvm/scummvm/commit/4e3033cf74b41a427cf13e6e0a3b9a12d9f7cfa8
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-01T12:33:45+01:00
Commit Message:
AGS: Use case insensitive comparison for prefix in ResolveScriptPath
Changed paths:
engines/ags/engine/ac/file.cpp
diff --git a/engines/ags/engine/ac/file.cpp b/engines/ags/engine/ac/file.cpp
index 3fc6de3849..252b86e572 100644
--- a/engines/ags/engine/ac/file.cpp
+++ b/engines/ags/engine/ac/file.cpp
@@ -356,7 +356,7 @@ bool ResolveScriptPath(const String &orig_sc_path, bool read_only, ResolvedPath
debugC(::AGS::kDebugFilePath, "Adding ScummVM game target prefix and flatten path");
child_path.Replace('/', '-');
String gameTarget = ConfMan.getActiveDomainName();
- if (child_path.CompareLeft(gameTarget) != 0)
+ if (child_path.CompareLeftNoCase(gameTarget) != 0)
child_path = String::FromFormat("%s-%s", gameTarget.GetCStr(), child_path.GetCStr());
}
#endif
Commit: 500ee6539abe7c20ad36fd7af671e3423d20a90a
https://github.com/scummvm/scummvm/commit/500ee6539abe7c20ad36fd7af671e3423d20a90a
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-01T12:35:31+01:00
Commit Message:
AGS: Do not add the prefix twice when saving bitmaps
This happened when the bitmap is saved from a script as then
the path goes through ResolveScriptPath which already adds the
prefix.
The double prefix meant that when the script tried to read the
file, the name was different (as then it only has the prefix
added once) and this failed.
One game that does this is Strangeland.
Changed paths:
engines/ags/shared/gfx/allegro_bitmap.cpp
diff --git a/engines/ags/shared/gfx/allegro_bitmap.cpp b/engines/ags/shared/gfx/allegro_bitmap.cpp
index 8bbc9dad12..1eb058bafe 100644
--- a/engines/ags/shared/gfx/allegro_bitmap.cpp
+++ b/engines/ags/shared/gfx/allegro_bitmap.cpp
@@ -135,7 +135,9 @@ bool Bitmap::SaveToFile(const char *filename, const void *palette) {
size_t lastSlash = name.findLastOf('/');
if (lastSlash != Common::String::npos)
name = name.substr(lastSlash + 1);
- name = ConfMan.getActiveDomainName() + "-" + name;
+ Common::String gameTarget = ConfMan.getActiveDomainName();
+ if (!name.hasPrefixIgnoreCase(gameTarget))
+ name = gameTarget + "-" + name;
Common::OutSaveFile *out = g_system->getSavefileManager()->openForSaving(name, false);
assert(out);
More information about the Scummvm-git-logs
mailing list