From 2f70d1bd9c01b342316c7b1bb9a3a6cdb0369e4b Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 1 Dec 2024 23:18:27 +1000 Subject: [PATCH] CPU: Write trace log to data directory --- src/core/cpu_core.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/cpu_core.cpp b/src/core/cpu_core.cpp index 6443afaf9..34720981f 100644 --- a/src/core/cpu_core.cpp +++ b/src/core/cpu_core.cpp @@ -20,6 +20,7 @@ #include "common/fastjmp.h" #include "common/file_system.h" #include "common/log.h" +#include "common/path.h" #include "fmt/format.h" @@ -144,9 +145,9 @@ void CPU::StopTrace() void CPU::WriteToExecutionLog(const char* format, ...) { - if (!s_log_file_opened) + if (!s_log_file_opened) [[unlikely]] { - s_log_file = FileSystem::OpenCFile("cpu_log.txt", "wb"); + s_log_file = FileSystem::OpenCFile(Path::Combine(EmuFolders::DataRoot, "cpu_log.txt").c_str(), "wb"); s_log_file_opened = true; }