Explorar o código

hxtelemetry test support

Nicolas Cannasse %!s(int64=7) %!d(string=hai) anos
pai
achega
ce82a60447
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      hxd/System.hl.hx

+ 6 - 0
hxd/System.hl.hx

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