HostFS: Add is_host check in the dopen_HLE method

This commit is contained in:
Francisco Javier Trujillo Mata 2021-04-27 11:23:11 +02:00 committed by refractionpcsx2
parent 6902ce007a
commit b2618ba148
1 changed files with 21 additions and 16 deletions

View File

@ -503,25 +503,30 @@ namespace R3000A
IOManDir* dir = NULL;
const std::string path = Ra0;
int err = HostDir::open(&dir, path);
if (is_host(path))
{
int err = HostDir::open(&dir, path);
if (err != 0 || !dir)
{
if (err == 0)
err = -IOP_EIO;
if (dir)
dir->close();
v0 = err;
}
else
{
v0 = allocfd(dir);
if ((s32)v0 < 0)
dir->close();
if (err != 0 || !dir)
{
if (err == 0)
err = -IOP_EIO;
if (dir)
dir->close();
v0 = err;
}
else
{
v0 = allocfd(dir);
if ((s32)v0 < 0)
dir->close();
}
pc = ra;
return 1;
}
pc = ra;
return 1;
return 0;
}
int dclose_HLE()