CPU: Write trace log to data directory

This commit is contained in:
Stenzek 2024-12-01 23:18:27 +10:00
parent e9848a6182
commit 2f70d1bd9c
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -20,6 +20,7 @@
#include "common/fastjmp.h" #include "common/fastjmp.h"
#include "common/file_system.h" #include "common/file_system.h"
#include "common/log.h" #include "common/log.h"
#include "common/path.h"
#include "fmt/format.h" #include "fmt/format.h"
@ -144,9 +145,9 @@ void CPU::StopTrace()
void CPU::WriteToExecutionLog(const char* format, ...) 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; s_log_file_opened = true;
} }