2021-12-25 22:36:38 +01:00
|
|
|
#include "core/stdafx.h"
|
|
|
|
#include "engine/sys_dll.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Sys_Error_Internal
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
int HSys_Error_Internal(char* fmt, va_list args)
|
|
|
|
{
|
2022-03-12 13:19:31 +01:00
|
|
|
char buffer[2048]{};
|
2022-09-14 01:14:51 +02:00
|
|
|
Error(eDLL_T::COMMON, NO_ERROR, "_______________________________________________________________\n");
|
|
|
|
Error(eDLL_T::COMMON, NO_ERROR, "] ENGINE ERROR ################################################\n");
|
2022-03-12 13:19:31 +01:00
|
|
|
vsprintf(buffer, fmt, args);
|
2022-09-14 01:14:51 +02:00
|
|
|
Error(eDLL_T::COMMON, NO_ERROR, "%s\n", buffer);
|
2021-12-25 22:36:38 +01:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
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);
|
|
|
|
}
|