Explorar o código

moved event loop at init out of __init__ (close #922)

Nicolas Cannasse %!s(int64=4) %!d(string=hai) anos
pai
achega
30034c663e
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      hxd/System.hl.hx

+ 4 - 3
hxd/System.hl.hx

@@ -402,9 +402,10 @@ class System {
 		sentinel = new hl.UI.Sentinel(30, function() throw "Program timeout (infinite loop?)");
 		haxe.MainLoop.add(timeoutTick, -1) #if (haxe_ver >= 4) .isBlocking = false #end;
 		#end
-		#if (hlsdl || hldx)
-		haxe.MainLoop.add(updateCursor, -1) #if (haxe_ver >= 4) .isBlocking = false #end;
-		#end
 	}
+	
+	#if (hlsdl || hldx)
+	static var _ = haxe.MainLoop.add(updateCursor, -1) #if (haxe_ver >= 4) .isBlocking = false #end;
+	#end
 
 }