From 0cc5db85c11602b33354257c97b59e9b2cb2561c Mon Sep 17 00:00:00 2001 From: Rafi Date: Tue, 4 Aug 2026 18:34:05 +0100 Subject: [PATCH] Remove Haxe 3 and `flash` support from the shadowed Log class Nobody use Haxe 3 to compile nor target flash for the engine anyway. --- source/lime/utils/Log.hx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/source/lime/utils/Log.hx b/source/lime/utils/Log.hx index a9f174cee2..91421d7ab1 100644 --- a/source/lime/utils/Log.hx +++ b/source/lime/utils/Log.hx @@ -19,7 +19,7 @@ class Log if (level >= LogLevel.DEBUG) { #if js - untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").debug("[" + info.className + "] " + message); + untyped js.Syntax.code ("console").debug("[" + info.className + "] " + message); #elseif !macro FunkinLogs.trace('[${info.className}] $message', INFO, LIGHTGRAY); #else @@ -66,10 +66,8 @@ class Log { #if sys Sys.print(Std.string(message)); - #elseif flash - untyped __global__["trace"](Std.string(message)); #elseif js - untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").log(message); + untyped js.Syntax.code ("console").log(message); #else trace(message); #end @@ -79,10 +77,8 @@ class Log { #if sys Sys.println(Std.string(message)); - #elseif flash - untyped __global__["trace"](Std.string(message)); #elseif js - untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").log(message); + untyped js.Syntax.code ("console").log(message); #else trace(Std.string(message)); #end @@ -137,14 +133,14 @@ class Log #end #if js - if (untyped #if haxe4 js.Syntax.code #else __js__ #end ("typeof console") == "undefined") + if (untyped js.Syntax.code ("typeof console") == "undefined") { - untyped #if haxe4 js.Syntax.code #else __js__ #end ("console = {}"); + untyped js.Syntax.code ("console = {}"); } - if (untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").log == null) + if (untyped js.Syntax.code ("console").log == null) { - untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").log = function() {}; + untyped js.Syntax.code ("console").log = function() {}; } #end } -} \ No newline at end of file +}