aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-14 02:10:42 -0700
committerChris Robinson <[email protected]>2011-09-14 02:10:42 -0700
commit2171aaa35c2c8487107699e183519f8aa3a79e71 (patch)
treee25f940debf1e15c004935bdc108720fe8cd5b24
parent97024151e49d97ed3ae9d73a9426de0f1a9ebb0f (diff)
Use IsDebuggerPresent instead of the VC-only __try/__except
-rw-r--r--Alc/ALc.c7
-rw-r--r--OpenAL32/alError.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index c5329cfa..79e759f6 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1346,12 +1346,9 @@ ALCvoid alcSetError(ALCdevice *device, ALCenum errorCode)
if(TrapALCError)
{
#ifdef _WIN32
- /* Safely catch a breakpoint exception that wasn't caught by a debugger */
- __try {
+ /* DebugBreak() will cause an exception if there is no debugger */
+ if(IsDebuggerPresent())
DebugBreak();
- } __except((GetExceptionCode()==EXCEPTION_BREAKPOINT) ?
- EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
- }
#elif defined(SIGTRAP)
kill(getpid(), SIGTRAP);
#endif
diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c
index 8b95423b..f1c157f5 100644
--- a/OpenAL32/alError.c
+++ b/OpenAL32/alError.c
@@ -48,12 +48,9 @@ ALvoid alSetError(ALCcontext *Context, ALenum errorCode)
if(TrapALError)
{
#ifdef _WIN32
- /* Safely catch a breakpoint exception that wasn't caught by a debugger */
- __try {
+ /* DebugBreak will cause an exception if there is no debugger */
+ if(IsDebuggerPresent())
DebugBreak();
- } __except((GetExceptionCode()==EXCEPTION_BREAKPOINT) ?
- EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
- }
#elif defined(SIGTRAP)
kill(getpid(), SIGTRAP);
#endif