Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/lime/utils/AssetLibrary.hx
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@ class AssetLibrary
{
return cachedImages.get(id);
}
else if (cachedBytes.exists(id))
{
var image = Image.fromBytes(cachedBytes.get(id));
cachedBytes.remove(id);
cachedImages.set(id, image);
return image;
}
else if (classTypes.exists(id))
{
#if flash
Expand Down Expand Up @@ -341,7 +348,7 @@ class AssetLibrary
|| cachedAudioBuffers.exists(id) || cachedFonts.exists(id);

case IMAGE:
cachedImages.exists(id);
cachedImages.exists(id) || cachedBytes.exists(id);

case MUSIC, SOUND:
cachedAudioBuffers.exists(id);
Expand Down Expand Up @@ -692,7 +699,7 @@ class AssetLibrary
{
#if !web
case IMAGE:
cachedImages.set(id, Image.fromBytes(data));
cachedBytes.set(id, data);
case MUSIC, SOUND:
cachedAudioBuffers.set(id, AudioBuffer.fromBytes(data));
case FONT:
Expand Down
Loading