Fix ALCdevice typedef for openal >=1.20.1

This commit is contained in:
Struma 2020-03-11 13:57:30 -04:00 committed by Roza
parent 3a6e4aeff4
commit a17258fbf0
2 changed files with 10 additions and 1 deletions

View file

@ -38,7 +38,7 @@
#include <stdint.h>
struct RGSSThreadData;
typedef struct ALCdevice_struct ALCdevice;
typedef struct ALCDEVICE_STRUCT ALCdevice;
struct SDL_Window;
union SDL_Event;

View file

@ -29,6 +29,15 @@ foreach l : explicit_libs.split(';')
endif
endforeach
alcdev_struct = 'ALCdevice_struct'
if openal.type_name() == 'pkgconfig'
if openal.version().version_compare('>=1.20.1')
alcdev_struct = 'ALCdevice'
endif
endif
global_args += '-DALCDEVICE_STRUCT=' + alcdev_struct
global_include_dirs += include_directories('.')
global_dependencies += [sigcxx, openal, opengl, zlib, pixman, physfs, vorbisfile, sdl2, sdl2_ttf, sdl2_image, sdl_sound]
if host_system == 'darwin'