diff --git a/src/lime/system/CFFI.hx b/src/lime/system/CFFI.hx index b40c7a807..5d12addb9 100644 --- a/src/lime/system/CFFI.hx +++ b/src/lime/system/CFFI.hx @@ -165,6 +165,11 @@ class CFFI { result = __tryLoad(ndllFolder + __sysName() + "64/" + library, library, method, args); } + + if (result == null) + { + result = __tryLoad(haxelib + "/ndll/" + __sysName() + "Arm64/" + library, library, method, args); + } } } diff --git a/tools/CommandLineTools.hx b/tools/CommandLineTools.hx index d6248e174..ac453a5c4 100644 --- a/tools/CommandLineTools.hx +++ b/tools/CommandLineTools.hx @@ -485,15 +485,14 @@ class CommandLineTools } case MAC: - // if (System.hostArchitecture == X64) { - - untyped $loader.path = $array(path + "Mac64/", $loader.path); - - // } else { - - // untyped $loader.path = $array (path + "Mac/", $loader.path); - - // } + if (System.hostArchitecture == X64) + { + untyped $loader.path = $array(path + "Mac64/", $loader.path); + } + else if (System.hostArchitecture == ARM64) + { + untyped $loader.path = $array(path + "MacArm64/", $loader.path); + } case LINUX: var arguments = Sys.args(); diff --git a/tools/SVGExport.hx b/tools/SVGExport.hx index c11c9774d..94b442337 100644 --- a/tools/SVGExport.hx +++ b/tools/SVGExport.hx @@ -67,8 +67,14 @@ class SVGExport // } case MAC: - untyped $loader.path = $array(path + "Mac/", $loader.path); - untyped $loader.path = $array(path + "Mac64/", $loader.path); + if (System.hostArchitecture == X64) + { + untyped $loader.path = $array(path + "Mac64/", $loader.path); + } + else if (System.hostArchitecture == ARM64) + { + untyped $loader.path = $array(path + "MacArm64/", $loader.path); + } case LINUX: var arguments = Sys.args();