Fix #if for Node.js/HTML5
This commit is contained in:
@@ -34,7 +34,7 @@ import format.png.Reader;
|
||||
import format.png.Tools;
|
||||
import format.png.Writer;
|
||||
import format.tools.Deflate;
|
||||
#if (sys || nodejs)
|
||||
#if sys
|
||||
import sys.io.File;
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -25,7 +25,7 @@ class PNG {
|
||||
|
||||
return lime_image_encode (image.buffer, 0, 0);
|
||||
|
||||
#elseif (!js && format)
|
||||
#elseif (!html5 && format)
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ class System {
|
||||
|
||||
private static function tryLoad (name:String, library:String, func:String, args:Int):Dynamic {
|
||||
|
||||
#if (sys && !html5 || nodejs)
|
||||
#if sys
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import lime.utils.ByteArray;
|
||||
import lime.utils.UInt8Array;
|
||||
import lime.Assets;
|
||||
|
||||
#if (sys || nodejs)
|
||||
#if sys
|
||||
import sys.FileSystem;
|
||||
#end
|
||||
|
||||
@@ -241,7 +241,7 @@ class DefaultAssetLibrary extends AssetLibrary {
|
||||
// TODO: Complete Lime Font API
|
||||
|
||||
#if openfl
|
||||
#if (flash || js)
|
||||
#if (flash || html5)
|
||||
|
||||
return cast (Type.createInstance (className.get (id), []), openfl.text.Font);
|
||||
|
||||
@@ -572,7 +572,7 @@ class DefaultAssetLibrary extends AssetLibrary {
|
||||
|
||||
/*public override function loadMusic (id:String, handler:Dynamic -> Void):Void {
|
||||
|
||||
#if (flash || js)
|
||||
#if (flash || html5)
|
||||
|
||||
//if (path.exists (id)) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user