[Debug]: Refactor the crit sections class wrapper
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include <STDInclude.hpp>
|
||||
#include "Game/Engine/ScopedCriticalSection.hpp"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
@ -288,7 +289,7 @@ namespace Components
|
||||
|
||||
sprintf_s(newFileName, "%s_%s.log", bug, Game::Live_GetLocalClientName(0));
|
||||
|
||||
Game::Sys_EnterCriticalSection(Game::CRITSECT_CONSOLE);
|
||||
Game::Engine::ScopedCriticalSection _(Game::CRITSECT_CONSOLE, Game::Engine::SCOPED_CRITSECT_NORMAL);
|
||||
|
||||
if (*Game::logfile)
|
||||
{
|
||||
@ -301,8 +302,6 @@ namespace Components
|
||||
const auto result = CopyFileA(from_ospath, to_ospath, 0);
|
||||
Game::Com_OpenLogFile();
|
||||
|
||||
Game::Sys_LeaveCriticalSection(Game::CRITSECT_CONSOLE);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
Logger::PrintError(1, "CopyFile failed({}) {} {}\n", GetLastError(), "console_mp.log", newFileName);
|
||||
|
Reference in New Issue
Block a user