summaryrefslogtreecommitdiffstats
path: root/make/joal-alc.cfg
diff options
context:
space:
mode:
authorkbr <[email protected]>2006-02-20 01:34:37 +0000
committerkbr <[email protected]>2006-02-20 01:34:37 +0000
commit68a842cc62f12e6372c804708690e31169368c30 (patch)
treebfe6c1310f5caa115251964d6b0ee2a53852cbba /make/joal-alc.cfg
parent48e6e34ebc8747ef80a4c74c18679f027a8172f0 (diff)
Added alcGetDeviceSpecifiers to support alcGetString(null, ALC_DEVICE_SPECIFIER);
rewrote alcGetString to use same underlying routine git-svn-id: file:///home/mbien/NetBeansProjects/JOGAMP/joal-sync/git-svn/../svn-server-sync/joal/trunk@113 03bf7f67-59de-4072-a415-9a990d468a3f
Diffstat (limited to 'make/joal-alc.cfg')
-rwxr-xr-xmake/joal-alc.cfg21
1 files changed, 19 insertions, 2 deletions
diff --git a/make/joal-alc.cfg b/make/joal-alc.cfg
index cdc24bb..5425fec 100755
--- a/make/joal-alc.cfg
+++ b/make/joal-alc.cfg
@@ -12,7 +12,9 @@ ProcAddressTableClassName ALCProcAddressTable
GetProcAddressTableExpr ALProcAddressLookup.getALCProcAddressTable()
ProcAddressNameExpr LP $UPPERCASE({0})
+Import java.io.UnsupportedEncodingException
Import java.nio.*
+Import java.util.*
Import net.java.games.joal.*
Import net.java.games.joal.impl.*
@@ -25,8 +27,18 @@ Ignore ^ALC_.+
# to use this routine to look up the ALC function pointers.
Ignore alcGetProcAddress
-# These routines use or return strings
-ReturnsString alcGetString
+# Move the body of alcGetString to a private method so we can
+# implement alcGetString(NULL, ALC_DEVICE_SPECIFIER) in another method
+RenameJavaMethod alcGetString alcGetStringImpl
+# Specify the return length of this function with our own custom strlen
+ReturnValueCapacity alcGetString strlen_alc(_ptr0, {1}, _res)
+
+# Note that we don't declare this as "ReturnsString" because we're
+# going to wrap it in another method
+IncludeAs CustomJavaCode ALC joal-alc-CustomJavaCode.java
+IncludeAs CustomJavaCode ALCImpl joal-alc-impl-CustomJavaCode.java
+
+# These routines use strings
ArgumentIsString alcIsExtensionPresent 1
ArgumentIsString alcOpenDevice 0
@@ -54,4 +66,9 @@ SkipProcAddressGen alcMakeContextCurrent
JavaEpilogue alcOpenDevice ALProcAddressLookup.resetALCProcAddressTable();
JavaEpilogue alcMakeContextCurrent ALProcAddressLookup.resetALProcAddressTable();
+# To be able to use alcGetString before a context is created we need
+# to instrument that routine as well
+JavaPrologue alcGetString ALProcAddressLookup.resetALCProcAddressTable();
+
IncludeAs CustomCCode joal-common-CustomCCode.c
+IncludeAs CustomCCode joal-alc-impl-CustomCCode.c