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:
Monster Iestyn 2020-05-28 18:49:15 +01:00
parent 5349a0bf62
commit b11d58aef5

View file

@ -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