[Scummvm-git-logs] scummvm master -> 52a52e17745525cd659a97a48b1f46acb4cb559f

Helco noreply at scummvm.org
Thu Nov 19 18:56:11 UTC 2026


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

Summary:
52a52e1774 ALCACHOFA: V2: Add even more fallbacks for broken file paths


Commit: 52a52e17745525cd659a97a48b1f46acb4cb559f
    https://github.com/scummvm/scummvm/commit/52a52e17745525cd659a97a48b1f46acb4cb559f
Author: Helco (hermann.noll at hotmail.com)
Date: 2026-11-19T19:55:46+01:00

Commit Message:
ALCACHOFA: V2: Add even more fallbacks for broken file paths

The previous fallbacks did not work for the filesystem of the Nintendo Switch.

Changed paths:
    engines/alcachofa/game-v2.cpp


diff --git a/engines/alcachofa/game-v2.cpp b/engines/alcachofa/game-v2.cpp
index f512ece6725..7cca12370ba 100644
--- a/engines/alcachofa/game-v2.cpp
+++ b/engines/alcachofa/game-v2.cpp
@@ -243,7 +243,7 @@ public:
 					hasChanges = true;
 				}
 			}
-			return hasChanges ? u32String.encode() : String();
+			return hasChanges ? u32String.encode() : alternativeAnimationName(path, variant + 1);
 		} else if (variant == 1) {
 			// Some of the Steam releases have wrong characters due to a messed up UTF8 conversion
 			for (uint i = 0; i < u32String.size(); i++) {
@@ -259,7 +259,31 @@ public:
 					hasChanges = true;
 				}
 			}
-			return hasChanges ? u32String.encode() : String();
+			return hasChanges ? u32String.encode() : alternativeAnimationName(path, variant + 1);
+		} else if (variant == 2 || variant == 3) {
+			// For the switch filesystem we have to work even harder to restore UTF8 (both upper- and lowercase)
+			const char or = variant == 3 ? 0x20 : 0;
+			char *tempStart = new char[path.size() * 2];
+			char *tempPtr = tempStart;
+			for (uint i = 0; i < path.size(); i++) {
+				switch(path[i])
+				{
+					case 0xC1:
+					case 0xD3:
+					case 0xCD:
+					case 0xD1:
+					case 0xC9:
+						*tempPtr++ = 0xC3;
+						*tempPtr++ = path[i] & ~0x40 | or;
+						break;
+					default:
+						*tempPtr++ = path[i];
+						break;
+				}
+			}
+			String result(tempStart, tempPtr);
+			delete[] tempStart;
+			return result;
 		} else
 			return String();
 	}




More information about the Scummvm-git-logs mailing list