r5sdk/r5dev/engine/sys_dll.cpp
Kawe Mazidjatari 729475c74c Light cleanup
Use NO_ERROR instead of NULL for error code parameter passed to Error(..).
2022-09-14 01:14:51 +02:00

29 lines
903 B
C++

#include "core/stdafx.h"
#include "engine/sys_dll.h"
//-----------------------------------------------------------------------------
// Sys_Error_Internal
//
//-----------------------------------------------------------------------------
int HSys_Error_Internal(char* fmt, va_list args)
{
char buffer[2048]{};
Error(eDLL_T::COMMON, NO_ERROR, "_______________________________________________________________\n");
Error(eDLL_T::COMMON, NO_ERROR, "] ENGINE ERROR ################################################\n");
vsprintf(buffer, fmt, args);
Error(eDLL_T::COMMON, NO_ERROR, "%s\n", buffer);
///////////////////////////////////////////////////////////////////////////
return Sys_Error_Internal(fmt, args);
}
void SysDll_Attach()
{
DetourAttach((LPVOID*)&Sys_Error_Internal, &HSys_Error_Internal);
}
void SysDll_Detach()
{
DetourDetach((LPVOID*)&Sys_Error_Internal, &HSys_Error_Internal);
}