From 6e011ad7999c0db58174fa4a615e826e275fedde Mon Sep 17 00:00:00 2001 From: Kayden Tebau Date: Sun, 18 Dec 2022 14:23:34 -0800 Subject: [PATCH] Use MACOS_BUNDLE def properly --- src/ResourceLoader.hx | 6 +++++- src/Settings.hx | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ResourceLoader.hx b/src/ResourceLoader.hx index bb1f8722..cd39324e 100644 --- a/src/ResourceLoader.hx +++ b/src/ResourceLoader.hx @@ -20,7 +20,11 @@ import src.ResourceLoaderWorker; class ResourceLoader { #if (hl && !android) - public static var fileSystem:FileSystem = new LocalFileSystem(Path.normalize(Path.join([Path.directory(Sys.programPath()), "..", "..", ".."])), null); + #if MACOS_BUNDLE + public static var fileSystem:FileSystem = new TorqueFileSystem(Path.normalize(Path.join([Path.directory(Sys.programPath()), "..", "..", ".."])), null); + #else + public static var fileSystem:FileSystem = new TorqueFileSystem(".", null); + #end #end #if (js || android) public static var fileSystem:FileSystem = null; diff --git a/src/Settings.hx b/src/Settings.hx index ab3715d2..1442e969 100644 --- a/src/Settings.hx +++ b/src/Settings.hx @@ -116,7 +116,13 @@ class Settings { public static var isTouch:Option = Option.None; + #if hl + #if MACOS_BUNDLE public static var settingsDir = Path.join([Sys.getEnv("HOME"), "Library", "Application Support", "MBHaxe-MBG"]); + #else + public static var settingsDir = "."; + #end + #end public static function applySettings() { #if hl