Android: Cleanup and remove usage of love:// custom protocol.

Let SDL3 handle content:// URI support instead.
This commit is contained in:
Miku AuahDark
2025-01-16 17:04:27 +08:00
parent be21958ab3
commit cb27e30879
3 changed files with 89 additions and 174 deletions
+8 -12
View File
@@ -279,20 +279,16 @@ bool Filesystem::setSource(const char *source)
if (!isAAssetMounted)
{
// Is this love2d://fd/ URIs?
int fd = love::android::getFDFromLoveProtocol(source);
if (fd != -1)
// Is this content:// URIs?
auto io = (PHYSFS_Io *) love::android::getIOFromContentProtocol(source);
if (PHYSFS_mountIo(io, "LOVE.FD", nullptr, 0))
{
PHYSFS_Io *io = (PHYSFS_Io *) love::android::getIOFromFD(fd);
if (PHYSFS_mountIo(io, "LOVE.FD", nullptr, 0))
{
gameSource = source;
return true;
}
io->destroy(io);
gameSource = source;
return true;
}
io->destroy(io);
}
#endif