浏览代码

hxtelemetry test support

Nicolas Cannasse 7 年之前
父节点
当前提交
ce82a60447
共有 1 个文件被更改,包括 6 次插入0 次删除
  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);
 	}