From fd22226242e20670096b8e45c9d24542670aa394 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 14 Sep 2011 11:58:51 -0700 Subject: [PATCH] Make alcSetError static --- Alc/ALc.c | 48 +++++++++++++++++++++++------------------------ OpenAL32/Include/alMain.h | 2 -- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/Alc/ALc.c b/Alc/ALc.c index 79e759f6..e4842eb5 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1024,6 +1024,30 @@ static ALCboolean IsValidALCChannels(ALCenum channels) } +/* alcSetError + * + * Stores the latest ALC Error + */ +static void alcSetError(ALCdevice *device, ALCenum errorCode) +{ + if(TrapALCError) + { +#ifdef _WIN32 + /* DebugBreak() will cause an exception if there is no debugger */ + if(IsDebuggerPresent()) + DebugBreak(); +#elif defined(SIGTRAP) + kill(getpid(), SIGTRAP); +#endif + } + + if(device) + device->LastError = errorCode; + else + g_eLastNullDeviceError = errorCode; +} + + /* UpdateDeviceParams * * Updates device parameters according to the attribute list (caller is @@ -1337,30 +1361,6 @@ static ALCdevice *VerifyDevice(ALCdevice *device) } -/* alcSetError - * - * Stores the latest ALC Error - */ -ALCvoid alcSetError(ALCdevice *device, ALCenum errorCode) -{ - if(TrapALCError) - { -#ifdef _WIN32 - /* DebugBreak() will cause an exception if there is no debugger */ - if(IsDebuggerPresent()) - DebugBreak(); -#elif defined(SIGTRAP) - kill(getpid(), SIGTRAP); -#endif - } - - if(device) - device->LastError = errorCode; - else - g_eLastNullDeviceError = errorCode; -} - - ALCvoid LockDevice(ALCdevice *device) { EnterCriticalSection(&device->Mutex); diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index bbe66bd2..40b90383 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -644,8 +644,6 @@ void AppendDeviceList(const ALCchar *name); void AppendAllDeviceList(const ALCchar *name); void AppendCaptureDeviceList(const ALCchar *name); -ALCvoid alcSetError(ALCdevice *device, ALCenum errorCode); - ALCvoid LockDevice(ALCdevice *device); ALCvoid UnlockDevice(ALCdevice *device); ALCvoid LockContext(ALCcontext *context); -- 2.11.4.GIT