Android: Fix filesystem initialization when fused.

This commit is contained in:
Miku AuahDark
2025-06-30 15:38:26 +08:00
parent 029b14d6b3
commit 6cab1a10fc
+5 -4
View File
@@ -273,7 +273,6 @@ bool Filesystem::setSource(const char *source)
PHYSFS_Io *gameLoveIO; PHYSFS_Io *gameLoveIO;
bool hasFusedGame = love::android::checkFusedGame((void **) &gameLoveIO); bool hasFusedGame = love::android::checkFusedGame((void **) &gameLoveIO);
bool isAAssetMounted = false;
if (hasFusedGame) if (hasFusedGame)
{ {
@@ -295,12 +294,12 @@ bool Filesystem::setSource(const char *source)
} }
// See love::android::initializeVirtualArchive() // See love::android::initializeVirtualArchive()
new_search_path = "ASET.AASSET"; gameSource = "ASET.AASSET";
isAAssetMounted = true; return true;
} }
} }
if (!isAAssetMounted) try
{ {
// Is this content:// URIs? // Is this content:// URIs?
auto io = (PHYSFS_Io *) love::android::getIOFromContentProtocol(source); auto io = (PHYSFS_Io *) love::android::getIOFromContentProtocol(source);
@@ -313,6 +312,8 @@ bool Filesystem::setSource(const char *source)
io->destroy(io); io->destroy(io);
} }
catch (const love::Exception &)
{}
#endif #endif
if (isMounted(new_search_path)) if (isMounted(new_search_path))