Compare commits

...
Author SHA1 Message Date
ZiemasandTy ca03806a4c EE/IOP: Fix loading elf's through relative path 2026-08-13 14:52:05 -04:00
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -83,8 +83,9 @@ static std::string hostRoot;
void Hle_SetHostRoot(const char* bootFilename)
{
hostRoot = Path::ToNativePath(Path::GetDirectory(bootFilename));
Console.WriteLn("HLE Host: Set 'host:' root path to: %s\n", hostRoot.c_str());
std::string path = Path::RealPath(bootFilename);
hostRoot = Path::ToNativePath(Path::GetDirectory(path));
Console.WriteLn("HLE Host: Set 'host:' root path to: %s", hostRoot.c_str());
}
void Hle_ClearHostRoot()
+3 -1
View File
@@ -3,6 +3,7 @@
#include "Common.h"
#include "common/Path.h"
#include "common/StringUtil.h"
#include "ps2/BiosTools.h"
#include "R5900.h"
@@ -671,7 +672,8 @@ void eeloadHook()
const std::string& elf_override = VMManager::Internal::GetELFOverride();
if (!elf_override.empty())
{
elfname = fmt::format("host:{}", elf_override);
// The host: root should be directory containg the elf, so get only the filename part
elfname = fmt::format("host:{}", Path::GetFileName(elf_override));
}
else
{