Use MACOS_BUNDLE def properly

This commit is contained in:
Kayden Tebau 2022-12-18 14:23:34 -08:00
parent c1b98e6a32
commit 6e011ad799
No known key found for this signature in database
GPG key ID: 933A1F44222C2634
2 changed files with 11 additions and 1 deletions

View file

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

View file

@ -116,7 +116,13 @@ class Settings {
public static var isTouch:Option<Bool> = 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