[Scummvm-git-logs] scummvm branch-2-3 -> 116b58b1bfd401e7dcb0dabe342a6f3b155fd618
criezy
criezy at scummvm.org
Wed Sep 1 11:39:37 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:
f18cc60404 AGS: Use case insensitive comparison for prefix in ResolveScriptPath
116b58b1bf AGS: Do not add the prefix twice when saving bitmaps
Commit: f18cc60404e8bc7e05a51cd65b7ec928960c4d42
https://github.com/scummvm/scummvm/commit/f18cc60404e8bc7e05a51cd65b7ec928960c4d42
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-01T12:39:21+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: 116b58b1bfd401e7dcb0dabe342a6f3b155fd618
https://github.com/scummvm/scummvm/commit/116b58b1bfd401e7dcb0dabe342a6f3b155fd618
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-01T12:39:21+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