From d3055e6e7a9217834218083e376d9899194e0eaf Mon Sep 17 00:00:00 2001 From: loudoweb Date: Wed, 5 Oct 2016 16:02:02 +0200 Subject: [PATCH] should fix isLocal when using not embedded assets on html5 and cpp --- templates/haxe/DefaultAssetLibrary.hx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/templates/haxe/DefaultAssetLibrary.hx b/templates/haxe/DefaultAssetLibrary.hx index 363f9e174..09da910ee 100644 --- a/templates/haxe/DefaultAssetLibrary.hx +++ b/templates/haxe/DefaultAssetLibrary.hx @@ -412,20 +412,19 @@ class DefaultAssetLibrary extends AssetLibrary { public override function isLocal (id:String, type:String):Bool { + #if (flash || windows || mac || linux) + + return className.exists (id); + + #else var requestedType = type != null ? cast (type, AssetType) : null; - - #if flash - - //if (requestedType != AssetType.MUSIC && requestedType != AssetType.SOUND) { - + if (requestedType == AssetType.FONT) return className.exists (id); - - //} + else + return path.exists (id); #end - return true; - }