From ad421365e67f0361ea0c70b4cdf6fc9e04c8893a Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Sun, 6 Dec 2015 20:02:33 +0100 Subject: [PATCH 1/2] Support for Lime without OpenFL. --- src/mirror/Jni.hx | 6 +++--- src/mirror/Mirror.hx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mirror/Jni.hx b/src/mirror/Jni.hx index 94fa8df..ec70ad4 100644 --- a/src/mirror/Jni.hx +++ b/src/mirror/Jni.hx @@ -77,15 +77,15 @@ class Jni + ' :: signature '+$v{jniSignature}); #end - #if (openfl || nme) + #if (openfl || lime || nme) if ($v{isStaticMethod}) { - $i{fieldName} = openfl.utils.JNI.createStaticMethod( + $i{fieldName} = #if lime lime.system#else openfl.utils#end.JNI.createStaticMethod( $v{jniPackage}, $v{jniPrimitive}, $v{jniSignature}); } else { - $i{fieldName} = openfl.utils.JNI.createMemberMethod( + $i{fieldName} = #if lime lime.system#else openfl.utils#end.JNI.createMemberMethod( $v{jniPackage}, $v{jniPrimitive}, $v{jniSignature}); } #end diff --git a/src/mirror/Mirror.hx b/src/mirror/Mirror.hx index cdba9d5..f6fc187 100644 --- a/src/mirror/Mirror.hx +++ b/src/mirror/Mirror.hx @@ -31,7 +31,7 @@ class Mirror var isIos = #if munit true #else Context.defined("ios") #end; var isAndroid = #if munit true #else Context.defined("android") #end; var isOpenFl = Context.defined("openfl") || Context.defined("nme"); - var isEnabled = #if (openfl || munit) true #else false #end; + var isEnabled = #if (openfl || lime || munit) true #else false #end; var fieldDisabled:Bool; var func:Function; From 006a44af4a5d512f54750732abbb761e50a5e210 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Wed, 22 Jun 2016 10:35:01 +0200 Subject: [PATCH 2/2] Reversed #if. OpenFL legacy could give problems. --- src/mirror/Jni.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mirror/Jni.hx b/src/mirror/Jni.hx index ec70ad4..8836582 100644 --- a/src/mirror/Jni.hx +++ b/src/mirror/Jni.hx @@ -80,12 +80,12 @@ class Jni #if (openfl || lime || nme) if ($v{isStaticMethod}) { - $i{fieldName} = #if lime lime.system#else openfl.utils#end.JNI.createStaticMethod( + $i{fieldName} = #if openfl openfl.utils#else lime.system#end.JNI.createStaticMethod( $v{jniPackage}, $v{jniPrimitive}, $v{jniSignature}); } else { - $i{fieldName} = #if lime lime.system#else openfl.utils#end.JNI.createMemberMethod( + $i{fieldName} = #if openfl openfl.utils#else lime.system#end.JNI.createMemberMethod( $v{jniPackage}, $v{jniPrimitive}, $v{jniSignature}); } #end