summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alExtension.c
diff options
context:
space:
mode:
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;
}