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