mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-20 04:36:01 +08:00
[saco] Implement/match exc_filter(...)
This commit is contained in:
@ -11,12 +11,15 @@ PCONTEXT pContextRecord;
|
||||
extern HANDLE hInstance;
|
||||
extern CGame *pGame;
|
||||
extern CNetGame *pNetGame;
|
||||
extern CChatWindow *pChatWindow;
|
||||
extern DWORD dwScmOpcodeDebug;
|
||||
extern BOOL bScmLocalDebug;
|
||||
extern int iGtaVersion;
|
||||
extern WORD wLastRendObj;
|
||||
extern WORD wVehicleComponentDebug;
|
||||
|
||||
CHAR szErrorString[16384];
|
||||
int dword_10125A58=0;
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
@ -226,4 +229,34 @@ LONG WINAPI exc_handler(_EXCEPTION_POINTERS* exc_inf)
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
//----------------------------------------------------
|
||||
|
||||
int exc_filter(unsigned int code, struct _EXCEPTION_POINTERS *ep, char *what)
|
||||
{
|
||||
if(pChatWindow)
|
||||
{
|
||||
if(!strcmp(what, "opcode"))
|
||||
{
|
||||
if(dwScmOpcodeDebug == 1767)
|
||||
{
|
||||
pChatWindow->AddDebugMessage("Warning(add_car_component %u): Exception 0x%X at 0x%X",
|
||||
wVehicleComponentDebug, code, ep->ContextRecord->Eip);
|
||||
return 1;
|
||||
} else {
|
||||
pChatWindow->AddDebugMessage("Warning(opcode 0x%X): Exception 0x%X at 0x%X",
|
||||
dwScmOpcodeDebug, code, ep->ContextRecord->Eip);
|
||||
}
|
||||
} else {
|
||||
pChatWindow->AddDebugMessage("Warning(%s): Exception 0x%X at 0x%X",
|
||||
what, code, ep->ContextRecord->Eip);
|
||||
}
|
||||
}
|
||||
|
||||
if(dword_10125A58 < 10) {
|
||||
dword_10125A58++;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
@ -28,6 +28,8 @@ CUnkClass15 *pUnkClass15=0;
|
||||
|
||||
BOOL bGameInited=FALSE;
|
||||
|
||||
WORD wVehicleComponentDebug=0;
|
||||
|
||||
IDirect3D9 *pD3D;
|
||||
IDirect3DDevice9 *pD3DDevice = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user