Make alcSetError static

This commit is contained in:
Chris Robinson
2011-09-14 11:58:51 -07:00
parent fe1e046ea6
commit fd22226242
2 changed files with 24 additions and 26 deletions
+24 -24
View File
@@ -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);
-2
View File
@@ -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);