diff options
author | Chris Robinson <[email protected]> | 2009-09-12 16:45:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-09-12 16:45:46 -0700 |
commit | 59ed9338d88fc76c54c68c79af6b2f2999eac6df (patch) | |
tree | 93dc952f832d9db0d8e6db6556efdde57df2ebdf /OpenAL32 | |
parent | b444dea63b007b52a5eb5c2861c1e7091f31fe9d (diff) |
Add support for the in-progress ALC_EXT_thread_local_context extension
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index eba91d14..55b59b97 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -20,6 +20,12 @@ #endif #include <windows.h> +typedef DWORD tls_type; +#define tls_create(x) (*(x) = TlsAlloc()) +#define tls_delete(x) TlsFree((x)) +#define tls_get(x) TlsGetValue((x)) +#define tls_set(x, a) TlsSetValue((x), (a)) + #else #include <assert.h> @@ -33,6 +39,12 @@ #define IsBadWritePtr(a,b) (0) +typedef pthread_key_t tls_type; +#define tls_create(x) pthread_key_create((x), NULL) +#define tls_delete(x) pthread_key_delete((x)) +#define tls_get(x) pthread_getspecific((x)) +#define tls_set(x, a) pthread_setspecific((x), (a)) + typedef pthread_mutex_t CRITICAL_SECTION; static inline void EnterCriticalSection(CRITICAL_SECTION *cs) { @@ -314,6 +326,9 @@ const char *GetConfigValue(const char *blockName, const char *keyName, const cha int GetConfigValueInt(const char *blockName, const char *keyName, int def); float GetConfigValueFloat(const char *blockName, const char *keyName, float def); +ALCboolean ALCAPIENTRY alcMakeCurrent(ALCcontext *context); +ALCcontext* ALCAPIENTRY alcGetThreadContext(void); + #ifdef __cplusplus } #endif |