diff --git a/pcsx2/IopBios.cpp b/pcsx2/IopBios.cpp index 4ed09d970f..2f361b3c40 100644 --- a/pcsx2/IopBios.cpp +++ b/pcsx2/IopBios.cpp @@ -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() diff --git a/pcsx2/R5900.cpp b/pcsx2/R5900.cpp index d97df15440..64388bfc86 100644 --- a/pcsx2/R5900.cpp +++ b/pcsx2/R5900.cpp @@ -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 {