diff --git a/pcsx2/IopBios.cpp b/pcsx2/IopBios.cpp index 2bb71728a0..a5df6ecac7 100644 --- a/pcsx2/IopBios.cpp +++ b/pcsx2/IopBios.cpp @@ -96,6 +96,11 @@ void Hle_SetElfPath(const char* elfFileName) Console.WriteLn("HLE Host: Set 'host:' root path to: %s\n", hostRoot.c_str()); } +void Hle_ClearElfPath() +{ + hostRoot = {}; +} + namespace R3000A { diff --git a/pcsx2/IopBios.h b/pcsx2/IopBios.h index 3e5d47f62e..e433e8f4ec 100644 --- a/pcsx2/IopBios.h +++ b/pcsx2/IopBios.h @@ -86,3 +86,5 @@ namespace R3000A } // namespace R3000A extern void Hle_SetElfPath(const char* elfFileName); +extern void Hle_ClearElfPath(); + diff --git a/pcsx2/VMManager.cpp b/pcsx2/VMManager.cpp index da7ed12876..686d9105a1 100644 --- a/pcsx2/VMManager.cpp +++ b/pcsx2/VMManager.cpp @@ -905,6 +905,10 @@ bool VMManager::ApplyBootParameters(VMBootParameters params, std::string* state_ Hle_SetElfPath(s_elf_override.c_str()); EmuConfig.UseBOOT2Injection = true; } + else + { + Hle_ClearElfPath(); + } return true; }