Add Neko loader path init
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ class DefaultAssetLibrary extends AssetLibrary {
|
|||||||
#if flash
|
#if flash
|
||||||
|
|
||||||
return cast (Type.createInstance (className.get (id), []), ByteArray);
|
return cast (Type.createInstance (className.get (id), []), ByteArray);
|
||||||
|
|
||||||
#elseif js
|
#elseif js
|
||||||
|
|
||||||
var bytes:ByteArray = null;
|
var bytes:ByteArray = null;
|
||||||
@@ -174,7 +174,7 @@ class DefaultAssetLibrary extends AssetLibrary {
|
|||||||
bytes = null;
|
bytes = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bytes != null) {
|
if (bytes != null) {
|
||||||
|
|
||||||
bytes.position = 0;
|
bytes.position = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user