r5sdk/r5dedicated/msgbox.cpp
Amos d45e6446df Initial project setup for dedicated server
* Move shared utils to shared directory
* Partial cleanup of existing codebase
* Add precompiled header for debug configurations
2021-07-26 03:32:37 -07:00

24 lines
670 B
C++

#include "pch.h"
#include "hooks.h"
//-----------------------------------------------------------------------------
// Engine Error message box
//-----------------------------------------------------------------------------
int HMSG_EngineError(char* fmt, va_list args)
{
printf("\nENGINE ERROR #####################################\n");
vprintf(fmt, args);
///////////////////////////////////////////////////////////////////////////
return org_MSG_EngineError(fmt, args);
}
void AttachMSGBoxHooks()
{
DetourAttach((LPVOID*)&org_MSG_EngineError, &HMSG_EngineError);
}
void DetachMSGBoxHooks()
{
DetourDetach((LPVOID*)&org_MSG_EngineError, &HMSG_EngineError);
}