mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
Mac stuff
This commit is contained in:
parent
f1e1a7c906
commit
918b2a989e
3 changed files with 12 additions and 7 deletions
|
@ -7,10 +7,15 @@
|
|||
|
||||
if(OS == os_windows)
|
||||
DIRECTORY = environment_get_variable("userprofile") + "/AppData/Local/PixelComposer/";
|
||||
else if(OS == os_macosx)
|
||||
DIRECTORY = string(environment_get_variable("HOME")) + "/PixelComposer/";
|
||||
else if(OS == os_macosx) {
|
||||
var home_dir = environment_get_variable("HOME");
|
||||
if(string(home_dir) == "0")
|
||||
log_message("DIRECTORY", "Directory not found.");
|
||||
else
|
||||
DIRECTORY = string(home_dir) + "/PixelComposer/";
|
||||
}
|
||||
show_debug_message(DIRECTORY);
|
||||
|
||||
|
||||
if(!directory_exists(DIRECTORY))
|
||||
directory_create(DIRECTORY);
|
||||
if(!directory_exists(DIRECTORY + "temp"))
|
||||
|
@ -18,6 +23,8 @@
|
|||
|
||||
METADATA = __getdefaultMetaData();
|
||||
|
||||
PREF_LOAD();
|
||||
|
||||
log_clear();
|
||||
log_newline();
|
||||
log_message("SESSION", "Begin");
|
||||
|
@ -36,7 +43,7 @@
|
|||
__initNodes();
|
||||
__initSteamUGC();
|
||||
|
||||
PREF_LOAD();
|
||||
PREF_APPLY();
|
||||
loadFonts();
|
||||
loadGraphic(PREF_MAP[? "theme"]);
|
||||
loadColor(PREF_MAP[? "theme"]);
|
||||
|
|
|
@ -215,9 +215,9 @@ function MetaDataManager() constructor {
|
|||
METADATA = noone;
|
||||
|
||||
function __getdefaultMetaData() {
|
||||
var path = DIRECTORY + "meta.json";
|
||||
var meta = new MetaDataManager();
|
||||
|
||||
var path = DIRECTORY + "meta.json";
|
||||
if(!file_exists(path)) return meta;
|
||||
var over = json_load(path);
|
||||
return meta.deserialize(over);
|
||||
|
|
|
@ -233,8 +233,6 @@
|
|||
}
|
||||
|
||||
ds_map_destroy(map);
|
||||
|
||||
PREF_APPLY();
|
||||
}
|
||||
|
||||
function PREF_APPLY() {
|
||||
|
|
Loading…
Reference in a new issue