소스 검색

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

bstouls 8 년 전
부모
커밋
e394f73aaf
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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);
 		s.drawRec(ctx);
 		ctx.popTarget();
+		ctx.engine.frameCount--;
 	}
 
 	public function render( engine : h3d.Engine ) {
@@ -417,6 +418,7 @@ class Scene extends Layers implements h3d.IDrawable implements hxd.SceneEvents.I
 		posChanged = true;
 		engine.setRenderZone();
 		engine.end();
+		engine.frameCount--;
 		return new Bitmap(target);
 	}