mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
Make sure log is initialized when there is no param.sfo
Helps with testing firmware elfs and probably some homebrew.
This commit is contained in:
parent
f0cc8c0d54
commit
a29e555be6
@ -107,6 +107,12 @@ void Emulator::Run(const std::filesystem::path& file, const std::vector<std::str
|
|||||||
Common::PSFAttributes psf_attributes{};
|
Common::PSFAttributes psf_attributes{};
|
||||||
|
|
||||||
const auto param_sfo_path = mnt->GetHostPath("/app0/sce_sys/param.sfo");
|
const auto param_sfo_path = mnt->GetHostPath("/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)) {
|
if (std::filesystem::exists(param_sfo_path)) {
|
||||||
auto* param_sfo = Common::Singleton<PSF>::Instance();
|
auto* param_sfo = Common::Singleton<PSF>::Instance();
|
||||||
const bool success = param_sfo->Open(param_sfo_path);
|
const bool success = param_sfo->Open(param_sfo_path);
|
||||||
@ -117,10 +123,9 @@ void Emulator::Run(const std::filesystem::path& file, const std::vector<std::str
|
|||||||
|
|
||||||
if (Config::getSeparateLogFilesEnabled()) {
|
if (Config::getSeparateLogFilesEnabled()) {
|
||||||
Common::Log::Initialize(id + ".log");
|
Common::Log::Initialize(id + ".log");
|
||||||
} else {
|
|
||||||
Common::Log::Initialize();
|
|
||||||
}
|
|
||||||
Common::Log::Start();
|
Common::Log::Start();
|
||||||
|
}
|
||||||
|
|
||||||
LOG_INFO(Loader, "Starting shadps4 emulator v{} ", Common::VERSION);
|
LOG_INFO(Loader, "Starting shadps4 emulator v{} ", Common::VERSION);
|
||||||
LOG_INFO(Loader, "Revision {}", Common::g_scm_rev);
|
LOG_INFO(Loader, "Revision {}", Common::g_scm_rev);
|
||||||
LOG_INFO(Loader, "Branch {}", Common::g_scm_branch);
|
LOG_INFO(Loader, "Branch {}", Common::g_scm_branch);
|
||||||
|
Loading…
Reference in New Issue
Block a user