Skip to content

Commit

Permalink
CPU: Write trace log to data directory
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 1, 2024
1 parent e9848a6 commit 2f70d1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/cpu_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2f70d1b

Please sign in to comment.