Browse Source

hxtelemetry test support

Nicolas Cannasse 7 years ago
parent
commit
ce82a60447
1 changed files with 6 additions and 0 deletions
  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);
 	}