From 927f398658b6c548fef2fc48d71f0179de3d196b Mon Sep 17 00:00:00 2001 From: Stephen Miller <56742918+StevenMiller123@users.noreply.github.com> Date: Wed, 26 Feb 2025 06:51:02 -0600 Subject: [PATCH] core: Ensure logger is initialized when there is no param.sfo (#2542) * Make sure log is initialized when there is no param.sfo Helps with testing firmware elfs and probably some homebrew. * Clang * Clang --- src/emulator.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/emulator.cpp b/src/emulator.cpp index 68c1e332c..758720325 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -107,6 +107,11 @@ void Emulator::Run(const std::filesystem::path& file, const std::vectorGetHostPath("/app0/sce_sys/param.sfo"); + if (!std::filesystem::exists(param_sfo_path) || !Config::getSeparateLogFilesEnabled()) { + Common::Log::Initialize(); + Common::Log::Start(); + } + if (std::filesystem::exists(param_sfo_path)) { auto* param_sfo = Common::Singleton::Instance(); const bool success = param_sfo->Open(param_sfo_path); @@ -117,10 +122,8 @@ void Emulator::Run(const std::filesystem::path& file, const std::vector