Use optional CFFI in the Lime tools
This commit is contained in:
@@ -255,7 +255,11 @@ class System {
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
#if optional_cffi
|
#if optional_cffi
|
||||||
|
if (library != "lime" || method != "neko_init") {
|
||||||
|
|
||||||
lazy = true;
|
lazy = true;
|
||||||
|
|
||||||
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
if (disableCFFI) {
|
if (disableCFFI) {
|
||||||
@@ -478,7 +482,9 @@ class System {
|
|||||||
|
|
||||||
if (!__loadedNekoAPI) {
|
if (!__loadedNekoAPI) {
|
||||||
|
|
||||||
var init = load ("lime", "neko_init", 5, lazy);
|
try {
|
||||||
|
|
||||||
|
var init = load ("lime", "neko_init", 5);
|
||||||
|
|
||||||
if (init != null) {
|
if (init != null) {
|
||||||
|
|
||||||
@@ -506,6 +512,16 @@ class System {
|
|||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
} catch (e:Dynamic) {
|
||||||
|
|
||||||
|
if (!lazy) {
|
||||||
|
|
||||||
|
throw ("Could not find NekoAPI interface.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
__loadedNekoAPI = true;
|
__loadedNekoAPI = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,3 +4,4 @@
|
|||||||
-lib lime
|
-lib lime
|
||||||
-lib format
|
-lib format
|
||||||
#-lib svg
|
#-lib svg
|
||||||
|
-D optional_cffi
|
||||||
Reference in New Issue
Block a user