diff --git a/src/eventthread.h b/src/eventthread.h index c1859674..e78b1e67 100644 --- a/src/eventthread.h +++ b/src/eventthread.h @@ -38,7 +38,7 @@ #include struct RGSSThreadData; -typedef struct ALCdevice_struct ALCdevice; +typedef struct ALCDEVICE_STRUCT ALCdevice; struct SDL_Window; union SDL_Event; diff --git a/src/meson.build b/src/meson.build index 2094450a..3d94fc72 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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'