Fix Krom trace on Windows
This commit is contained in:
parent
eaf997182f
commit
e559c59c3b
|
@ -24,6 +24,19 @@ class SpaceArmory extends Trait {
|
|||
super();
|
||||
|
||||
notifyOnInit(init);
|
||||
|
||||
#if (sys_krom && !arm_viewport)
|
||||
// TODO: On Windows Krom does not output to stdout, redirect to stderr..
|
||||
if (Krom.systemId() == "Windows") {
|
||||
var haxeTrace = haxe.Log.trace;
|
||||
function kromTrace(v:Dynamic, ?inf:haxe.PosInfos) {
|
||||
var str = Std.string(v);
|
||||
Krom.sysCommand('>&2 echo "$str"');
|
||||
haxeTrace(v, inf);
|
||||
}
|
||||
haxe.Log.trace = kromTrace;
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
|
|
@ -22,7 +22,7 @@ def krom_trace(text):
|
|||
if len(txt) > 1 and txt[1].startswith('__arm'):
|
||||
bridge.parse_operator(txt[1])
|
||||
else:
|
||||
print_info(text)
|
||||
print(text)
|
||||
|
||||
def print_info(text):
|
||||
global tag_redraw
|
||||
|
|
Loading…
Reference in a new issue