Browse Source

reset frameCount after drawTo/captureBitmap (prevent keys not being checked)

bstouls 8 years ago
parent
commit
e394f73aaf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      h2d/Scene.hx

+ 2 - 0
h2d/Scene.hx

@@ -370,6 +370,7 @@ class Scene extends Layers implements h3d.IDrawable implements hxd.SceneEvents.I
 		ctx.pushTarget(t);
 		ctx.pushTarget(t);
 		s.drawRec(ctx);
 		s.drawRec(ctx);
 		ctx.popTarget();
 		ctx.popTarget();
+		ctx.engine.frameCount--;
 	}
 	}
 
 
 	public function render( engine : h3d.Engine ) {
 	public function render( engine : h3d.Engine ) {
@@ -417,6 +418,7 @@ class Scene extends Layers implements h3d.IDrawable implements hxd.SceneEvents.I
 		posChanged = true;
 		posChanged = true;
 		engine.setRenderZone();
 		engine.setRenderZone();
 		engine.end();
 		engine.end();
+		engine.frameCount--;
 		return new Bitmap(target);
 		return new Bitmap(target);
 	}
 	}