Pārlūkot izejas kodu

catch and print nme init exceptions (or else they go silent)

ncannasse 10 gadi atpakaļ
vecāks
revīzija
345cfd5ce8
1 mainītis faili ar 8 papildinājumiem un 1 dzēšanām
  1. 8 1
      hxd/System.hx

+ 8 - 1
hxd/System.hx

@@ -107,7 +107,14 @@ class System {
             nme.Lib.current.stage.align = nme.display.StageAlign.TOP_LEFT;
             nme.Lib.current.stage.scaleMode = nme.display.StageScaleMode.NO_SCALE;
             nme.Lib.current.loaderInfo = nme.display.LoaderInfo.create(null);
-            callb();
+			try {
+				callb();
+			} catch( e : Dynamic ) {
+				Sys.println(e);
+				#if debug
+				Sys.println(haxe.CallStack.toString(haxe.CallStack.exceptionStack()));
+				#end
+			}
          },
          width, height,
          120, // using 60 FPS with no vsync gives a fps ~= 50