diff --git a/src/utils/ImagePathResolver.h b/src/utils/ImagePathResolver.h index 90c1f7f..75f72e8 100644 --- a/src/utils/ImagePathResolver.h +++ b/src/utils/ImagePathResolver.h @@ -70,6 +70,22 @@ inline std::string resolveWithBase(const std::string& path) { if (tryOpenFile(combinedStr)) { return combinedStr; } + +#if defined(__APPLE__) + // When running from a macOS bundle, SDL_GetBasePath may point at + // Contents/Resources while assets are in Contents/MacOS. Search that + // sibling too so Finder launches find the packaged assets. + std::filesystem::path basePath(base); + auto contentsDir = basePath.parent_path(); + if (contentsDir.filename() == "Resources") { + auto macosDir = contentsDir.parent_path() / "MacOS"; + std::filesystem::path alt = macosDir / p; + std::string altStr = alt.string(); + if (tryOpenFile(altStr)) { + return altStr; + } + } +#endif } } return path;