Skip to content

Capture and present complete native window frames on macOS - #233

Open
Roxas2712 wants to merge 4 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/complete-window-frame
Open

Roxas2712 wants to merge 4 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/complete-window-frame

Conversation

@Roxas2712

Copy link
Copy Markdown

On macOS with an undefined OpenGL system framebuffer, raw screenshot capture can encode an upside-down, channel-swapped image even while the recovery window displays the correct scene. Render the complete window into an owned target and capture that current RGBA image, including native menus and mod HUDs. Add a bounded queued WindowFrame.capture(callback) API; route native driver capture and the error screen through the same presentation owner, with cleanup on resize/quit/error.

Depends on #193 (branch base de28fe4c); the new work starts at d18e96b5. Healthy direct backends retain native presentation. Metal retains a final GPU target; only the detected broken macOS OpenGL path uses an owned Cocoa layer. Ordinary recovery can pipeline one frame; observed/captured frames force current independent data. This adds a full-frame target and, on the recovery path, CPU readback. No general performance or context-loss acceptance is claimed.

Validation:

  • Four focused CPU suites pass: 1,162 frame, 1,431 asynchronous, 1,296 Cocoa and 108 function-pointer lifetime checks.
  • FireRed and Emerald, OpenGL and Metal: 16 actual owned-window proofs, zero blank/stale frames. Queued and native-driver PNGs are byte-identical per same-frame pair; red/blue/top markers prove orientation and channel order through native summary, real resize and field return. Source-bound receipts and limitations are in docs/qa/complete-frame-capture/gpu.json.
  • Standalone quick gate: 70/79 engine, 3/3 SDK, B30 pass. Exact branch base: 65/75 engine, 3/3 SDK, B30 pass. No added failure lines; nine suites fail on both. The existing static quit probe now finds its intended run-loop branch after the error branch was reshaped, accounting for the other changed result; no Android behavior fix is claimed.

Only general engine sources, tests and sanitized receipts are included. No ROMs, assets, imported caches, saves or private mod sources.

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