Browse Source

hxtelemetry test support

Nicolas Cannasse 7 năm trước cách đây
mục cha
commit
ce82a60447
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      hxd/System.hl.hx

+ 6 - 0
hxd/System.hl.hx

@@ -114,6 +114,9 @@ class System {
 
 	static function runMainLoop() {
 		var reportError = function(e) reportError(e);
+		#if hxtelemetry
+		var hxt = new hxtelemetry.HxTelemetry();
+		#end
 		while( true ) {
 			try {
 				hl.Api.setErrorHandler(reportError); // set exception trap
@@ -123,6 +126,9 @@ class System {
 				hl.Api.setErrorHandler(null);
 				reportError(e);
 			}
+			#if hxtelemetry
+			hxt.advance_frame();
+			#end
 		}
 		Sys.exit(0);
 	}