Merge pull request #522 from Matan/master

Fixed CPP target embedded assets
This commit is contained in:
Joshua Granick
2015-07-27 08:13:09 -07:00
2 changed files with 9 additions and 2 deletions

View File

@@ -286,7 +286,14 @@ class Preloader #if flash extends Sprite #end {
#if flash
private function current_onEnter (event:Event):Void {
// Failsafe for small binary missing the 'onComplete' handler
if(!complete && Lib.current.loaderInfo.bytesLoaded == Lib.current.loaderInfo.bytesTotal)
{
complete = true;
update (Lib.current.loaderInfo.bytesLoaded, Lib.current.loaderInfo.bytesTotal);
}
if (complete) {
Lib.current.removeEventListener (Event.ENTER_FRAME, current_onEnter);

View File

@@ -792,7 +792,7 @@ class DefaultAssetLibrary extends AssetLibrary {
::if (assets != null)::::foreach assets::::if (!embed)::::if (type == "font")::@:keep #if display private #end class __ASSET__::flatName:: extends lime.text.Font { public function new () { __fontPath = #if ios "assets/" + #end "::targetPath::"; name = "::fontName::"; super (); }}
::end::::end::::end::::end::
#if (windows || mac || linux)
#if (windows || mac || linux || cpp)
::if (assets != null)::
::foreach assets::::if (embed)::::if (type == "image")::@:image("::sourcePath::") #if display private #end class __ASSET__::flatName:: extends lime.graphics.Image {}