Add support for HL libraries
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LIME_HASHLINK
|
||||
#include <hl.h>
|
||||
#endif
|
||||
#include <hx/CFFIPrime.h>
|
||||
#include <app/Application.h>
|
||||
#include <app/ApplicationEvent.h>
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define HL_NAME(n) hl_lime_##n
|
||||
#include <hl.h>
|
||||
|
||||
#include <hx/CFFIPrime.h>
|
||||
#include <system/CFFIPointer.h>
|
||||
#include <system/Mutex.h>
|
||||
@@ -1886,8 +1889,20 @@ namespace lime {
|
||||
}
|
||||
|
||||
|
||||
HL_PRIM ALCdevice* HL_NAME (alc_open_device) (vbyte *devicename) {
|
||||
|
||||
ALCdevice* alcDevice = alcOpenDevice ((char*)devicename);
|
||||
atexit (lime_al_atexit);
|
||||
|
||||
// TODO: GC
|
||||
|
||||
return alcDevice;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void lime_alc_pause_device (value device) {
|
||||
|
||||
|
||||
#ifdef LIME_OPENALSOFT
|
||||
ALCdevice* alcDevice = (ALCdevice*)val_data (device);
|
||||
alcDevicePauseSOFT (alcDevice);
|
||||
@@ -2038,6 +2053,12 @@ 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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user