From a64f75a88079817df90c1408b266c58c98c59172 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 13 Apr 2021 00:08:40 -0700 Subject: [PATCH] Fix isAssetMounted not using virtual mount path Otherwise, it would report that tiles.png wasn't mounted when it was, and recolor one-way tiles in levels that don't want their one-ways recolored. --- desktop_version/src/FileSystemUtils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index c170936b..5a1d8354 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -418,6 +418,7 @@ static void getMountedPath( bool FILESYSTEM_isAssetMounted(const char* filename) { const char* realDir; + char path[MAX_PATH]; /* Fast path */ if (assetDir[0] == '\0') @@ -425,7 +426,9 @@ bool FILESYSTEM_isAssetMounted(const char* filename) return false; } - realDir = PHYSFS_getRealDir(filename); + getMountedPath(path, sizeof(path), filename); + + realDir = PHYSFS_getRealDir(path); if (realDir == NULL) {