mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
EE/IOP: Fix loading elf's through relative path
(cherry picked from commit ca03806a4c86e8fbfc948fcb110f3961be10e5b2)
This commit is contained in:
+3
-2
@@ -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
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#include "common/Path.h"
|
||||
#include "common/StringUtil.h"
|
||||
#include "ps2/BiosTools.h"
|
||||
#include "R5900.h"
|
||||
@@ -729,7 +730,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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user