mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
# macosx compile fix
(OpenAL ALC string definition differs on Windows vs OSX) This was SVN commit r7000.
This commit is contained in:
@@ -30,6 +30,14 @@
|
||||
# include <AL/alc.h>
|
||||
#endif
|
||||
|
||||
// ALC strings (e.g. device and extension names) are typed differently
|
||||
// between platforms *sigh*
|
||||
#if OS_MACOSX
|
||||
typedef ALCubyte* alcString;
|
||||
#else
|
||||
typedef ALCchar* alcString;
|
||||
#endif
|
||||
|
||||
#if MSC_VERSION
|
||||
# pragma comment(lib, "openal32.lib")
|
||||
#endif
|
||||
|
||||
@@ -248,7 +248,7 @@ static LibError alc_init()
|
||||
#if OS_WIN
|
||||
__try
|
||||
{
|
||||
alc_dev = alcOpenDevice((ALCchar*)alc_dev_name);
|
||||
alc_dev = alcOpenDevice((alcString)alc_dev_name);
|
||||
}
|
||||
// if invalid handle, handle it; otherwise, continue handler search.
|
||||
__except(GetExceptionCode() == EXCEPTION_INVALID_HANDLE)
|
||||
@@ -256,7 +256,7 @@ static LibError alc_init()
|
||||
// ignore
|
||||
}
|
||||
#else
|
||||
alc_dev = alcOpenDevice(alc_dev_name);
|
||||
alc_dev = alcOpenDevice((alcString)alc_dev_name);
|
||||
#endif
|
||||
|
||||
if(alc_dev)
|
||||
@@ -686,7 +686,7 @@ static const char* devs;
|
||||
*/
|
||||
LibError snd_dev_prepare_enum()
|
||||
{
|
||||
if(alcIsExtensionPresent(0, (ALCchar*)"ALC_ENUMERATION_EXT") != AL_TRUE)
|
||||
if(alcIsExtensionPresent(0, (alcString)"ALC_ENUMERATION_EXT") != AL_TRUE)
|
||||
WARN_RETURN(ERR::NO_SYS);
|
||||
|
||||
devs = (const char*)alcGetString(0, ALC_DEVICE_SPECIFIER);
|
||||
|
||||
Reference in New Issue
Block a user