From c606ec5139d3bc8f8b9e7e59ca1adbee2771bc70 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Thu, 26 Apr 2018 14:11:58 -0700 Subject: [PATCH] Binding fix --- lime/_backend/native/NativeCFFI.hx | 2 +- project/include/hl.h | 2 ++ project/src/media/openal/OpenALBindings.cpp | 7 +++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lime/_backend/native/NativeCFFI.hx b/lime/_backend/native/NativeCFFI.hx index 5b4270172..0f656ac68 100644 --- a/lime/_backend/native/NativeCFFI.hx +++ b/lime/_backend/native/NativeCFFI.hx @@ -288,7 +288,7 @@ class NativeCFFI { @:cffi private static function lime_alc_suspend_context (context:CFFIPointer):Void; #if hl - @:hlNative("lime", "hl_lime_alc_open_device") private static function hl_lime_alc_open_device (devicename:hl.Bytes):lime.media.openal.ALDevice { return null; }; + @:hlNative("lime", "lime_alc_open_device") private static function hl_lime_alc_open_device (devicename:hl.Bytes):lime.media.openal.ALDevice { return null; }; #end @:cffi private static function lime_al_gen_filter():CFFIPointer; diff --git a/project/include/hl.h b/project/include/hl.h index a7cdde5c1..a132e5bd4 100644 --- a/project/include/hl.h +++ b/project/include/hl.h @@ -53,8 +53,10 @@ #if defined(linux) || defined(__linux__) # define HL_LINUX +#ifndef _GNU_SOURCE # define _GNU_SOURCE #endif +#endif #if defined(HL_IOS) || defined(HL_ANDROID) || defined(HL_TVOS) # define HL_MOBILE diff --git a/project/src/media/openal/OpenALBindings.cpp b/project/src/media/openal/OpenALBindings.cpp index 69d235862..6b8e86c45 100644 --- a/project/src/media/openal/OpenALBindings.cpp +++ b/project/src/media/openal/OpenALBindings.cpp @@ -12,9 +12,7 @@ #endif #endif -#define HL_NAME(n) hl_lime_##n #include - #include #include #include @@ -1889,7 +1887,7 @@ namespace lime { } - HL_PRIM ALCdevice* HL_NAME (alc_open_device) (vbyte *devicename) { + HL_PRIM ALCdevice* hl_lime_alc_open_device (vbyte *devicename) { ALCdevice* alcDevice = alcOpenDevice ((char*)devicename); atexit (lime_al_atexit); @@ -2053,10 +2051,11 @@ namespace lime { DEFINE_PRIME1v (lime_alc_resume_device); DEFINE_PRIME1v (lime_alc_suspend_context); + #define TDEVICE _ABSTRACT (alc_device) #define TCONTEXT _ABSTRACT (alc_context) - DEFINE_HL_PRIM (TDEVICE, hl_lime_alc_open_device, _BYTES); + DEFINE_HL_PRIM (TDEVICE, lime_alc_open_device, _BYTES); }