fix fs and compile

This commit is contained in:
RandomityGuy 2022-12-28 21:28:06 +05:30
parent 651f473ac5
commit 33b39c273e
2 changed files with 3 additions and 4 deletions

View file

@ -51,8 +51,7 @@ class ResourceLoader {
public static function init(scene2d:h2d.Scene, onLoadedFunc:Void->Void) { public static function init(scene2d:h2d.Scene, onLoadedFunc:Void->Void) {
Console.log("Initializing filesystem"); Console.log("Initializing filesystem");
#if hl #if (hl && !android)
@:privateAccess @:privateAccess cast(fileSystem, TorqueFileSystem).convert.tmpDir = "data/tmp/";
Console.log("Filesystem Path: " + @:privateAccess cast(fileSystem, TorqueFileSystem).baseDir); Console.log("Filesystem Path: " + @:privateAccess cast(fileSystem, TorqueFileSystem).baseDir);
#end #end
hxd.res.Resource.LIVE_UPDATE = false; // Disable live update to save frames hxd.res.Resource.LIVE_UPDATE = false; // Disable live update to save frames

View file

@ -322,11 +322,11 @@ class Settings {
public static function load() { public static function load() {
Console.log("Loading settings"); Console.log("Loading settings");
var settingsExists = false; var settingsExists = false;
#if hl #if (hl && !android)
settingsExists = FileSystem.exists(Path.join([settingsDir, "settings.json"])); settingsExists = FileSystem.exists(Path.join([settingsDir, "settings.json"]));
#end #end
#if android #if android
// settingsDir = @:privateAccess String.fromUTF8(get_storage_path()); settingsDir = @:privateAccess String.fromUTF8(get_storage_path());
#end #end
#if js #if js
var localStorage = js.Browser.getLocalStorage(); var localStorage = js.Browser.getLocalStorage();