ppsspp_screenshot
Capture the current PPSSPP framebuffer as an image with metadata. Specifies render or output source, returns file path, and flags empty frames when no rendered scene is available.
Instructions
PURPOSE: Capture the framebuffer as an image (ImageContent) plus metadata.
USAGE: session_id optional when exactly one session is active; source='render' (default; empty frames auto-fall back to VRAM — colors unreliable there) or 'output' (CRASH-RISK, do not use); mutually exclusive with the deprecated mode param.
BEHAVIOR: READ-ONLY. An empty capture returns empty=true instead of an error — advance to a rendered scene and retry.
RETURNS: structuredContent metadata (mode/source/size_bytes/width/height/file_path/format/empty); the image itself arrives as an ImageContent block. The auto-saved PNG/JPG path is in file_path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | DEPRECATED — use `source` instead. Legacy Win32 / VRAM fallback paths. 'auto' = three-tier fallback (wm_command → printwindow → vram). 'wm_command' / 'printwindow' / 'vram' = the specific strategy. Mutually exclusive with `source`. | |
| source | No | Capture source (new, preferred). 'render' = with_stepping + gpu.buffer.renderColor (default when neither source nor mode is given). 'output' = gpu.buffer.screenshot (CRASH-RISK on some games). Mutually exclusive with `mode`. | |
| session_id | No | Active session ID; omit to auto-resolve when exactly one session is active. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Capture mode used. Echoes the caller's `mode` value ('auto'/'wm_command'/'printwindow'/'vram') on the deprecated path, or the `source` value ('render'/'output') on the new path. | |
| empty | Yes | True when the capture produced no pixels (size_bytes=0 and no ImageContent). Agents can branch on this instead of parsing size_bytes heuristics — mirrors dump_texture's CAPTURE_EMPTY error. | |
| width | Yes | Image width in pixels (0 if unknown). | |
| format | Yes | Image format ('png' or 'jpeg'). | |
| height | Yes | Image height in pixels (0 if unknown). | |
| source | Yes | The `source` parameter value when the new path was taken, or None when the deprecated `mode` path was used. | |
| file_path | Yes | Path where image was saved. | |
| size_bytes | Yes | Decoded image size in bytes. |