Added support for HostFs when booting an iso

This commit is contained in:
Daniel Gerendasy 2023-11-09 19:07:32 -08:00 committed by Connor McLaughlin
parent 3ca7d2d626
commit b5f8ef0106
3 changed files with 11 additions and 0 deletions

View File

@ -102,6 +102,12 @@ void Hle_SetElfPath(const char* elfFileName)
Console.WriteLn("HLE Host: Set 'host:' root path to: %s\n", hostRoot.c_str());
}
void Hle_SetIsoPath(const char* isoFilename)
{
hostRoot = Path::ToNativePath(Path::GetDirectory(isoFilename));
Console.WriteLn("HLE Host: Set 'host:' root path to: %s\n", hostRoot.c_str());
}
void Hle_ClearElfPath()
{
hostRoot = {};

View File

@ -87,5 +87,6 @@ namespace R3000A
} // namespace R3000A
extern void Hle_SetElfPath(const char* elfFileName);
extern void Hle_SetIsoPath(const char* isoFilename);
extern void Hle_ClearElfPath();

View File

@ -1190,6 +1190,10 @@ bool VMManager::Initialize(VMBootParameters boot_params)
Hle_SetElfPath(s_elf_override.c_str());
}
else if (CDVDsys_GetSourceType() == CDVD_SourceType::Iso)
{
Hle_SetIsoPath(CDVDsys_GetFile(CDVDsys_GetSourceType()).c_str());
}
else
{
Hle_ClearElfPath();