From 33b39c273e14f3fcb81020de774734c3a4923f83 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Wed, 28 Dec 2022 21:28:06 +0530 Subject: [PATCH] fix fs and compile --- src/ResourceLoader.hx | 3 +-- src/Settings.hx | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ResourceLoader.hx b/src/ResourceLoader.hx index 0a695c7b..61605ca0 100644 --- a/src/ResourceLoader.hx +++ b/src/ResourceLoader.hx @@ -51,8 +51,7 @@ class ResourceLoader { public static function init(scene2d:h2d.Scene, onLoadedFunc:Void->Void) { Console.log("Initializing filesystem"); - #if hl - @:privateAccess @:privateAccess cast(fileSystem, TorqueFileSystem).convert.tmpDir = "data/tmp/"; + #if (hl && !android) Console.log("Filesystem Path: " + @:privateAccess cast(fileSystem, TorqueFileSystem).baseDir); #end hxd.res.Resource.LIVE_UPDATE = false; // Disable live update to save frames diff --git a/src/Settings.hx b/src/Settings.hx index 5398ece6..4a5c336b 100644 --- a/src/Settings.hx +++ b/src/Settings.hx @@ -322,11 +322,11 @@ class Settings { public static function load() { Console.log("Loading settings"); var settingsExists = false; - #if hl + #if (hl && !android) settingsExists = FileSystem.exists(Path.join([settingsDir, "settings.json"])); #end #if android - // settingsDir = @:privateAccess String.fromUTF8(get_storage_path()); + settingsDir = @:privateAccess String.fromUTF8(get_storage_path()); #end #if js var localStorage = js.Browser.getLocalStorage();