RSP: Set max log size as 300mb

This commit is contained in:
zilmar 2024-07-06 18:51:55 +09:30
parent 0e0f0f7618
commit 1af8570315
1 changed files with 18 additions and 7 deletions

View File

@ -8,17 +8,28 @@
#include <Project64-rsp-core/Settings/RspSettings.h>
#include <Settings/Settings.h>
CLog * RDPLog = NULL;
CLog * CPULog = NULL;
CLog * RDPLog = nullptr;
CLog * CPULog = nullptr;
void StartCPULog(void)
{
if (CPULog == NULL)
if (CPULog != nullptr)
{
char LogDir[260];
CPath LogFilePath(GetSystemSettingSz(Set_DirectoryLog, LogDir, sizeof(LogDir)), "RSP_x86Log.txt");
CPULog = new CLog;
CPULog->Open(LogFilePath);
return;
}
char LogDir[260];
CPath LogFilePath(GetSystemSettingSz(Set_DirectoryLog, LogDir, sizeof(LogDir)), "RSP_x86Log.txt");
CPULog = new CLog;
if (CPULog != nullptr)
{
if (CPULog->Open(LogFilePath))
{
CPULog->SetMaxFileSize(300 * CLog::MB);
}
else
{
StopCPULog();
}
}
}