From 4af89576aa49e48657a651a9b0a4eaa0b1566021 Mon Sep 17 00:00:00 2001 From: Daniel Gerendasy Date: Thu, 9 Nov 2023 21:53:32 -0800 Subject: [PATCH] IOP HLE: Rename update host root functions --- pcsx2/IopBios.cpp | 13 +++---------- pcsx2/IopBios.h | 5 ++--- pcsx2/VMManager.cpp | 10 +++++----- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/pcsx2/IopBios.cpp b/pcsx2/IopBios.cpp index cdd1ee42854cd..688dc619d57b0 100644 --- a/pcsx2/IopBios.cpp +++ b/pcsx2/IopBios.cpp @@ -95,20 +95,13 @@ typedef struct static std::string hostRoot; -void Hle_SetElfPath(const char* elfFileName) +void Hle_SetHostRoot(const char* bootFilename) { - DevCon.WriteLn("HLE Host: Will load ELF: %s\n", elfFileName); - hostRoot = Path::ToNativePath(Path::GetDirectory(elfFileName)); + hostRoot = Path::ToNativePath(Path::GetDirectory(bootFilename)); 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() +void Hle_ClearHostRoot() { hostRoot = {}; } diff --git a/pcsx2/IopBios.h b/pcsx2/IopBios.h index 8b099dd8e3ff6..4ee207a4391eb 100644 --- a/pcsx2/IopBios.h +++ b/pcsx2/IopBios.h @@ -86,7 +86,6 @@ namespace R3000A } } // namespace R3000A -extern void Hle_SetElfPath(const char* elfFileName); -extern void Hle_SetIsoPath(const char* isoFilename); -extern void Hle_ClearElfPath(); +extern void Hle_SetHostRoot(const char* bootFilename); +extern void Hle_ClearHostRoot(); diff --git a/pcsx2/VMManager.cpp b/pcsx2/VMManager.cpp index 6e54155f4ebcc..987979d1c1d9f 100644 --- a/pcsx2/VMManager.cpp +++ b/pcsx2/VMManager.cpp @@ -1188,15 +1188,15 @@ bool VMManager::Initialize(VMBootParameters boot_params) return false; } - Hle_SetElfPath(s_elf_override.c_str()); + Hle_SetHostRoot(s_elf_override.c_str()); } else if (CDVDsys_GetSourceType() == CDVD_SourceType::Iso) { - Hle_SetIsoPath(CDVDsys_GetFile(CDVDsys_GetSourceType()).c_str()); + Hle_SetHostRoot(CDVDsys_GetFile(CDVDsys_GetSourceType()).c_str()); } else { - Hle_ClearElfPath(); + Hle_ClearHostRoot(); } // Check for resuming with hardcore mode. @@ -1984,9 +1984,9 @@ bool VMManager::SetELFOverride(std::string path) s_fast_boot_requested = !s_elf_override.empty() || EmuConfig.EnableFastBoot; if (s_elf_override.empty()) - Hle_ClearElfPath(); + Hle_ClearHostRoot(); else - Hle_SetElfPath(s_elf_override.c_str()); + Hle_SetHostRoot(s_elf_override.c_str()); Reset(); return true;