Skip to content

截图:Aokana 的 BitBlt 画面冻住时改用 PrintWindow - #714

Open
Plastic-time wants to merge 1 commit into
ilynthn:mainfrom
Plastic-time:rrfz/frozen-bitblt-capture
Open

Plastic-time wants to merge 1 commit into
ilynthn:mainfrom
Plastic-time:rrfz/frozen-bitblt-capture

Conversation

@Plastic-time

Copy link
Copy Markdown
Contributor

问题

Aokana(Steam 版,Unity)换场景或收起对话框后,上一句的译文还留在画面上。

这个窗口用 BitBlt 截图时,整局拿到的都是同一张旧画面。它不是空白,所以一直被当成正常画面。场景检测和对话框检测拿这张旧图比,看不出画面已经变了。

改动

  • BitBlt 的画面 3 秒没变,屏幕却在动或者和它对不上,三票后判定截图冻结,改用 PrintWindow。仍然是每个窗口 2 秒一次,不放宽防闪烁的限速。冻结窗口只打客户区,场景检测复用每次打印的画面,帧稀疏时点击后至少看 3 帧再下结论。
  • 以下情况不投票,不会被判冻结:游戏不在前台;窗口没按显示器 DPI 绘制(不支持 DPI 的游戏在系统缩放下,截图和屏幕本来就对不上);大部分采样点被 MeguLit 自己的窗口盖住。
  • 看不出结果时 2 秒后再查。投票期间画面已经换了的,这一票作废。

在 Aokana 上本地试玩(系统缩放 150%):开局几秒内判出冻结,之后场景检测每 2 秒拿到一帧实时画面,CG 背景变了而对话框还在时不会误收。开场从偏白的画面切到全白时,画面只变了约 20%,像素上分不出,这种情况旧译文要等下一句才换掉。新增 validation/scene-hide.test.cjs 用例和 --mode-self-test 的冻结自检。

…indow

Aokana's Unity window gave BitBlt one old picture for the whole session.
It is not blank, so it counted as proven, and the scene and box checks
compared that picture with itself.

A BitBlt picture that stays the same for 3 s is now checked against the
screen while the game is in front. Three checks where the screen moved
meanwhile, or shows another picture, mark it frozen. The window is then
printed like a blind one, under the same 2 s limit, client area only, and
the scene probe reuses each print.

No vote is taken for a window not drawn at its monitor's DPI (a
DPI-unaware game under display scaling) or with most sampled points under
MeguLit's own windows. A check that cannot tell waits 2 s. A vote about a
picture another reader has replaced meanwhile is dropped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant