]> git.mxchange.org Git - flightgear.git/blobdiff - tests/al-info.c
Fix another crash in the autobrake code, with 'aircraft' (eg, ATC) with no weight...
[flightgear.git] / tests / al-info.c
index db411453fd728c774665fcde042da7a58c145bf4..13c68f2048d153db0e5998fe2365751ca16af1d8 100644 (file)
@@ -1,21 +1,36 @@
 
 #include <stdio.h>
 
-#include <AL/al.h>
-#include <AL/alc.h>
-#include <AL/alext.h>
+#ifdef __APPLE__
+# include <OpenAL/al.h>
+# include <OpenAL/alc.h>
+#else
+# include <AL/al.h>
+# include <AL/alc.h>
+# ifndef __CYGWIN__
+#  include <AL/alext.h>
+# endif
+#endif
+
+#ifndef AL_VERSION_1_1
+# ifdef __APPLE__
+#  include <OpenAL/altypes.h>
+#  include <OpenAL/alctypes.h>
+#else
+#  include <AL/altypes.h>
+#  include <AL/alctypes.h>
+# endif
+#endif
 
 #define MAX_DATA       16
 
 int main()
 {
-   ALCint i,j;
    ALCint data[MAX_DATA];
    ALCdevice *device = NULL;
    ALCcontext *context = NULL;
-   const ALCchar *s;
+   const ALchar *s;
    ALCenum error;
-   ALCboolean ret;
 
    device = alcOpenDevice(NULL);
    if (device == NULL)
@@ -46,7 +61,7 @@ int main()
    alcGetError(device);
 
    printf("\n");
-   if (alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT") == AL_TRUE)
+   if (alcIsExtensionPresent(NULL, (const ALchar *)"ALC_ENUMERATION_EXT") == AL_TRUE)
    {
       s = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
       printf("ALC_DEVICE_SPECIFIER = \"%s\"\n", s);
@@ -93,7 +108,7 @@ int main()
    }
 #endif
 
-   ret = alcCloseDevice(device);
+   alcCloseDevice(device);
 
-   return ret;
+   return 0;
 }