aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alExtension.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-30 18:10:04 -0700
committerChris Robinson <[email protected]>2011-06-30 18:10:04 -0700
commit723755788d645a04d7191dc631807660ce0125cb (patch)
tree40528da53b4652ea9b832cbb71079d024b6e13a6 /OpenAL32/alExtension.c
parent032d0836a74f0e17c99d68e3163f070397123abf (diff)
Rename Suspend/ProcessContext since they are locking a mutex
Diffstat (limited to 'OpenAL32/alExtension.c')
-rw-r--r--OpenAL32/alExtension.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/OpenAL32/alExtension.c b/OpenAL32/alExtension.c
index ebb2e252..ed6236b2 100644
--- a/OpenAL32/alExtension.c
+++ b/OpenAL32/alExtension.c
@@ -335,39 +335,37 @@ const struct EffectList EffectList[] = {
AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extName)
{
ALboolean bIsSupported = AL_FALSE;
- ALCcontext *pContext;
+ ALCcontext *Context;
const char *ptr;
size_t len;
- pContext = GetContextSuspended();
- if(!pContext) return AL_FALSE;
+ Context = GetLockedContext();
+ if(!Context) return AL_FALSE;
if(!extName)
+ alSetError(Context, AL_INVALID_VALUE);
+ else
{
- alSetError(pContext, AL_INVALID_VALUE);
- ProcessContext(pContext);
- return AL_FALSE;
- }
-
- len = strlen(extName);
- ptr = pContext->ExtensionList;
- while(ptr && *ptr)
- {
- if(strncasecmp(ptr, extName, len) == 0 &&
- (ptr[len] == '\0' || isspace(ptr[len])))
- {
- bIsSupported = AL_TRUE;
- break;
- }
- if((ptr=strchr(ptr, ' ')) != NULL)
+ len = strlen(extName);
+ ptr = Context->ExtensionList;
+ while(ptr && *ptr)
{
- do {
- ++ptr;
- } while(isspace(*ptr));
+ if(strncasecmp(ptr, extName, len) == 0 &&
+ (ptr[len] == '\0' || isspace(ptr[len])))
+ {
+ bIsSupported = AL_TRUE;
+ break;
+ }
+ if((ptr=strchr(ptr, ' ')) != NULL)
+ {
+ do {
+ ++ptr;
+ } while(isspace(*ptr));
+ }
}
}
- ProcessContext(pContext);
+ UnlockContext(Context);
return bIsSupported;
}