From 06487ad3633535a6f04f90c92e1db252369fcca5 Mon Sep 17 00:00:00 2001 From: Valerio Santinelli Date: Fri, 2 Oct 2015 18:36:46 +0200 Subject: [PATCH] tvOS support for default assets library --- templates/haxe/DefaultAssetLibrary.hx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/haxe/DefaultAssetLibrary.hx b/templates/haxe/DefaultAssetLibrary.hx index c18295306..579571601 100644 --- a/templates/haxe/DefaultAssetLibrary.hx +++ b/templates/haxe/DefaultAssetLibrary.hx @@ -315,14 +315,15 @@ class DefaultAssetLibrary extends AssetLibrary { #else if (className.exists (id)) { - var fontClass = className.get (id); return cast (Type.createInstance (fontClass, []), Image); } else { - + #if tvos + return Image.fromFile ("assets/" + path.get (id)); + #else return Image.fromFile (path.get (id)); - + #end } #end @@ -711,7 +712,7 @@ class DefaultAssetLibrary extends AssetLibrary { if (!className.exists (asset.id)) { - #if ios + #if ios || tvos path.set (asset.id, "assets/" + asset.path); #else path.set (asset.id, asset.path);