mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-26 20:51:38 +00:00
fix path
This commit is contained in:
parent
e6fb205e99
commit
6b3da6b5cc
2 changed files with 9 additions and 5 deletions
|
|
@ -39,10 +39,7 @@ class Console {
|
||||||
entries = [];
|
entries = [];
|
||||||
consumers = [];
|
consumers = [];
|
||||||
timeSinceStart = haxe.Timer.stamp();
|
timeSinceStart = haxe.Timer.stamp();
|
||||||
#if hl
|
#if (hl && !android)
|
||||||
if (!FileSystem.exists(Settings.settingsDir)) {
|
|
||||||
FileSystem.createDirectory(Settings.settingsDir);
|
|
||||||
}
|
|
||||||
consoleFileHandle = sys.io.File.write(haxe.io.Path.join([Settings.settingsDir, "console.log"]), false);
|
consoleFileHandle = sys.io.File.write(haxe.io.Path.join([Settings.settingsDir, "console.log"]), false);
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
@ -58,7 +55,7 @@ class Console {
|
||||||
function addEntry(type:String, msg:String) {
|
function addEntry(type:String, msg:String) {
|
||||||
var e = new ConsoleEntry(getTime(), type, msg);
|
var e = new ConsoleEntry(getTime(), type, msg);
|
||||||
entries.push(e);
|
entries.push(e);
|
||||||
#if hl
|
#if (hl && !android)
|
||||||
consoleFileHandle.writeString('[${e.time}] ${e.text}\n');
|
consoleFileHandle.writeString('[${e.time}] ${e.text}\n');
|
||||||
#end
|
#end
|
||||||
for (c in consumers) {
|
for (c in consumers) {
|
||||||
|
|
|
||||||
|
|
@ -205,6 +205,10 @@ class Settings {
|
||||||
var i = 4;
|
var i = 4;
|
||||||
return hl.Bytes.fromValue("null", i);
|
return hl.Bytes.fromValue("null", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@:hlNative("std", "sys_special") static function sys_special(key:hl.Bytes):hl.Bytes {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
public static function applySettings() {
|
public static function applySettings() {
|
||||||
|
|
@ -321,6 +325,9 @@ class Settings {
|
||||||
#if hl
|
#if hl
|
||||||
settingsExists = FileSystem.exists(Path.join([settingsDir, "settings.json"]));
|
settingsExists = FileSystem.exists(Path.join([settingsDir, "settings.json"]));
|
||||||
#end
|
#end
|
||||||
|
#if android
|
||||||
|
settingsDir = @:privateAccess String.fromUCS2(sys_special(@:privateAccess Sys.getPath("android_internal_storage_path")));
|
||||||
|
#end
|
||||||
#if js
|
#if js
|
||||||
var localStorage = js.Browser.getLocalStorage();
|
var localStorage = js.Browser.getLocalStorage();
|
||||||
if (localStorage != null) {
|
if (localStorage != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue