diff --git a/templates/haxe/ApplicationMain.hx b/templates/haxe/ApplicationMain.hx index 56611ee14..f6d99c3da 100644 --- a/templates/haxe/ApplicationMain.hx +++ b/templates/haxe/ApplicationMain.hx @@ -81,4 +81,15 @@ class ApplicationMain { } + #if neko + @:noCompletion public static function __init__ () { + + untyped $loader.path = $array (haxe.io.Path.directory (Sys.executablePath ()), $loader.path); + untyped $loader.path = $array ("./", $loader.path); + untyped $loader.path = $array ("@executable_path/", $loader.path); + + } + #end + + } \ No newline at end of file diff --git a/templates/haxe/DefaultAssetLibrary.hx b/templates/haxe/DefaultAssetLibrary.hx index 4a250a3a5..a0198ea26 100644 --- a/templates/haxe/DefaultAssetLibrary.hx +++ b/templates/haxe/DefaultAssetLibrary.hx @@ -154,7 +154,7 @@ class DefaultAssetLibrary extends AssetLibrary { #if flash return cast (Type.createInstance (className.get (id), []), ByteArray); - + #elseif js var bytes:ByteArray = null; @@ -174,7 +174,7 @@ class DefaultAssetLibrary extends AssetLibrary { bytes = null; } - + if (bytes != null) { bytes.position = 0;