diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llappviewerwin32.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/linden/indra/newview/llappviewerwin32.cpp b/linden/indra/newview/llappviewerwin32.cpp index 9c416a1..b665cb4 100644 --- a/linden/indra/newview/llappviewerwin32.cpp +++ b/linden/indra/newview/llappviewerwin32.cpp | |||
@@ -127,7 +127,14 @@ LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *excepti | |||
127 | return retval; | 127 | return retval; |
128 | } | 128 | } |
129 | 129 | ||
130 | int APIENTRY WinMain(HINSTANCE hInstance, | 130 | |
131 | #if DEBUGGING_SEH_FILTER | ||
132 | # define WINMAIN DebuggingWinMain | ||
133 | #else | ||
134 | # define WINMAIN WinMain | ||
135 | #endif | ||
136 | |||
137 | int APIENTRY WINMAIN(HINSTANCE hInstance, | ||
131 | HINSTANCE hPrevInstance, | 138 | HINSTANCE hPrevInstance, |
132 | LPSTR lpCmdLine, | 139 | LPSTR lpCmdLine, |
133 | int nCmdShow) | 140 | int nCmdShow) |
@@ -207,6 +214,27 @@ int APIENTRY WinMain(HINSTANCE hInstance, | |||
207 | return 0; | 214 | return 0; |
208 | } | 215 | } |
209 | 216 | ||
217 | #if DEBUGGING_SEH_FILTER | ||
218 | // The compiler doesn't like it when you use __try/__except blocks | ||
219 | // in a method that uses object destructors. Go figure. | ||
220 | // This winmain just calls the real winmain inside __try. | ||
221 | // The __except calls our exception filter function. For debugging purposes. | ||
222 | int APIENTRY WinMain(HINSTANCE hInstance, | ||
223 | HINSTANCE hPrevInstance, | ||
224 | LPSTR lpCmdLine, | ||
225 | int nCmdShow) | ||
226 | { | ||
227 | __try | ||
228 | { | ||
229 | WINMAIN(hInstance, hPrevInstance, lpCmdLine, nCmdShow); | ||
230 | } | ||
231 | __except( viewer_windows_exception_handler( GetExceptionInformation() ) ) | ||
232 | { | ||
233 | _tprintf( _T("Exception handled.\n") ); | ||
234 | } | ||
235 | } | ||
236 | #endif | ||
237 | |||
210 | void LLAppViewerWin32::disableWinErrorReporting() | 238 | void LLAppViewerWin32::disableWinErrorReporting() |
211 | { | 239 | { |
212 | const char win_xp_string[] = "Microsoft Windows XP"; | 240 | const char win_xp_string[] = "Microsoft Windows XP"; |