mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
clean up BUGTRAP code in win32/win_main.c to avoid unmatched }
(though that said we don't officially care about the win32 folder files anymore)
This commit is contained in:
parent
5349a0bf62
commit
b11d58aef5
1 changed files with 16 additions and 25 deletions
|
@ -643,37 +643,28 @@ int WINAPI WinMain (HINSTANCE hInstance,
|
|||
int nCmdShow)
|
||||
{
|
||||
int Result = -1;
|
||||
|
||||
#if 0
|
||||
// Win95 and NT <4 don't have this, so link at runtime.
|
||||
p_IsDebuggerPresent pfnIsDebuggerPresent = (p_IsDebuggerPresent)GetProcAddress(GetModuleHandleA("kernel32.dll"),"IsDebuggerPresent");
|
||||
#endif
|
||||
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
UNREFERENCED_PARAMETER(nCmdShow);
|
||||
|
||||
#if 0
|
||||
#ifdef BUGTRAP
|
||||
// Try BugTrap first.
|
||||
if((!pfnIsDebuggerPresent || !pfnIsDebuggerPresent()) && InitBugTrap())
|
||||
Result = HandledWinMain(hInstance);
|
||||
else
|
||||
{
|
||||
#endif
|
||||
// Try Dr MinGW's exception handler.
|
||||
if (!pfnIsDebuggerPresent || !pfnIsDebuggerPresent())
|
||||
#endif
|
||||
LoadLibraryA("exchndl.dll");
|
||||
|
||||
#ifndef __MINGW32__
|
||||
prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo);
|
||||
#endif
|
||||
|
||||
Result = HandledWinMain(hInstance);
|
||||
#if 0
|
||||
p_IsDebuggerPresent pfnIsDebuggerPresent = (p_IsDebuggerPresent)GetProcAddress(GetModuleHandleA("kernel32.dll"),"IsDebuggerPresent");
|
||||
if((!pfnIsDebuggerPresent || !pfnIsDebuggerPresent())
|
||||
#ifdef BUGTRAP
|
||||
&& !InitBugTrap()
|
||||
#endif
|
||||
)
|
||||
#endif
|
||||
{
|
||||
LoadLibraryA("exchndl.dll");
|
||||
}
|
||||
}
|
||||
#ifndef __MINGW32__
|
||||
prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo);
|
||||
#endif
|
||||
Result = HandledWinMain(hInstance);
|
||||
#ifdef BUGTRAP
|
||||
} // BT failure clause.
|
||||
|
||||
// This is safe even if BT didn't start.
|
||||
ShutdownBugTrap();
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue