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; IOManDir* dir = NULL;
const std::string path = Ra0; 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 || !dir)
{ {
if (err == 0) if (err == 0)
err = -IOP_EIO; err = -IOP_EIO;
if (dir) if (dir)
dir->close(); dir->close();
v0 = err; v0 = err;
} }
else else
{ {
v0 = allocfd(dir); v0 = allocfd(dir);
if ((s32)v0 < 0) if ((s32)v0 < 0)
dir->close(); dir->close();
}
pc = ra;
return 1;
} }
pc = ra; return 0;
return 1;
} }
int dclose_HLE() int dclose_HLE()