diff options
author | Chris Robinson <[email protected]> | 2011-09-14 11:58:51 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-14 11:58:51 -0700 |
commit | fd22226242e20670096b8e45c9d24542670aa394 (patch) | |
tree | 054cc47a7534ba9f46f723e7ebfbd742eecb50d5 /Alc | |
parent | fe1e046ea6bd1881793bb1941220ff9bea1c959c (diff) |
Make alcSetError static
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 48 |
1 files changed, 24 insertions, 24 deletions
@@ -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); |