فهرست منبع

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

Nicolas Cannasse 4 سال پیش
والد
کامیت
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?)");
 		sentinel = new hl.UI.Sentinel(30, function() throw "Program timeout (infinite loop?)");
 		haxe.MainLoop.add(timeoutTick, -1) #if (haxe_ver >= 4) .isBlocking = false #end;
 		haxe.MainLoop.add(timeoutTick, -1) #if (haxe_ver >= 4) .isBlocking = false #end;
 		#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
 
 
 }
 }