r5sdk/r5dev/engine/sys_dll.cpp
2022-03-12 13:19:31 +01:00

30 lines
897 B
C++

#include "core/stdafx.h"
#include "engine/sys_dll.h"
#include "engine/sys_utils.h"
//-----------------------------------------------------------------------------
// Sys_Error_Internal
//
//-----------------------------------------------------------------------------
int HSys_Error_Internal(char* fmt, va_list args)
{
char buffer[2048]{};
Error(eDLL_T::NONE, "_______________________________________________________________\n");
Error(eDLL_T::NONE, "] ENGINE ERROR ################################################\n");
vsprintf(buffer, fmt, args);
Error(eDLL_T::NONE, "%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);
}