mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-06-04 23:15:00 -06:00
Only initialize logging once
This commit is contained in:
parent
6d2e6a439a
commit
4fbd9608f2
@ -271,10 +271,9 @@ void Emulator::Run(std::filesystem::path file, std::vector<std::string> args,
|
||||
}
|
||||
|
||||
game_info.game_folder = game_folder;
|
||||
EmulatorSettings.Load(id);
|
||||
|
||||
Common::Log::Shutdown();
|
||||
|
||||
// Initialize logging as soon as possible
|
||||
EmulatorSettings.Load(id);
|
||||
Common::Log::Setup((!id.empty() && EmulatorSettings.IsLogSeparate()) ? id + ".log"
|
||||
: "shad_log.txt");
|
||||
|
||||
|
||||
@ -103,9 +103,6 @@ int main(int argc, char* argv[]) {
|
||||
if (waitPid)
|
||||
Core::Debugger::WaitForPid(*waitPid);
|
||||
|
||||
// Start default log
|
||||
Common::Log::Setup("shad_log.txt");
|
||||
|
||||
IPC::Instance().Init();
|
||||
|
||||
auto emu_state = std::make_shared<EmulatorState>();
|
||||
@ -121,10 +118,8 @@ int main(int argc, char* argv[]) {
|
||||
EmulatorSettingsImpl::SetInstance(emu_settings);
|
||||
emu_settings->Load();
|
||||
|
||||
Common::Log::Shutdown();
|
||||
// Start configured log
|
||||
// Configure logger appropriately
|
||||
Common::Log::g_should_append |= EmulatorSettings.IsLogAppend();
|
||||
Common::Log::Setup("shad_log.txt");
|
||||
|
||||
if (bigPicture) {
|
||||
BigPictureMode::Launch(argv[0]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user