Skip to content

Commit b48aa99

Browse files
possible fix for libraries with no preload
1 parent 1a25bff commit b48aa99

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/lime/tools/AssetHelper.hx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class AssetHelper
2121
private static var DEFAULT_LIBRARY_NAME = "default";
2222
private static var knownExtensions:Map<String, AssetType>;
2323

24-
public static var EMBEDMANIFEST:Bool = false; // it can work if true, it just so happens that stuff like vlc might crash the thing cos it registers as being in the assets folder
24+
public static var EMBEDMANIFEST:Bool = true; // it can work if true, it just so happens that stuff like vlc might crash the thing cos it registers as being in the assets folder
2525

2626
private static function __init__():Void
2727
{
@@ -240,7 +240,7 @@ class AssetHelper
240240
{
241241
assetData.path = asset.resourceName;
242242

243-
if (asset.embed != false || (asset.library != null && libraries.exists(asset.library) && libraries[asset.library].preload))
243+
if (asset.embed != false && !EMBEDMANIFEST || (asset.library != null && libraries.exists(asset.library) && libraries[asset.library].preload))
244244
{
245245
assetData.preload = true;
246246
}
@@ -267,13 +267,13 @@ class AssetHelper
267267
else
268268
{
269269
if (project.target == WEB_ASSEMBLY
270-
&& (asset.embed != false
270+
&& (asset.embed != false && !EMBEDMANIFEST
271271
|| (asset.library != null && libraries.exists(asset.library) && libraries[asset.library].preload)))
272272
{
273273
assetData.preload = true;
274274
}
275275

276-
if (asset.embed == true || asset.type == FONT)
276+
if (asset.embed == true && !EMBEDMANIFEST || asset.type == FONT)
277277
{
278278
assetData.className = "__ASSET__" + asset.flatName;
279279
}
@@ -590,11 +590,13 @@ class AssetHelper
590590

591591
asset = new Asset("", "manifest/" + library.name + ".json", AssetType.MANIFEST);
592592

593-
if (embed || EMBEDMANIFEST)
593+
if (embed || (EMBEDMANIFEST))
594594
{
595595
asset.embed = true;
596596

597597

598+
if (!library.preload)
599+
return;
598600
}
599601
else
600602
{

0 commit comments

Comments
 (0)