2
0
Эх сурвалжийг харах

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

Nicolas Cannasse 4 жил өмнө
parent
commit
30034c663e
1 өөрчлөгдсөн 4 нэмэгдсэн , 3 устгасан
  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
 
 }