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) {
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

View file

@ -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();