> For the complete documentation index, see [llms.txt](https://docs.kouch.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kouch.dev/docs/steam_screenshots_plan.md).

# Game screenshots in Steam's Screenshots view

Owner, 2026-09-27: screenshots taken while playing through Kouch should show up in **Steam's Screenshots view**, filed under the game. This is a small addendum; it doesn't replace `PLAN_V2.md` or `HOME_LIBRARY_PLAN.md` (which covers Kouch's own captures on Home and the game page).

## Today (checked in the code)

* A screenshot in a game is the emulator's own: Kouch sends the profile's `hotkeys.screenshot` (the Quick Menu's button, or the emulator's own key), and the emulator writes a clean frame into the profile's `{screenshots}` folder. Kouch shows those on Home and the game page (`captures_latest`), and they sync with the rest of the `cloud` folders (ADR 0018).
* Kouch never calls ISteamScreenshots. Nothing Kouch or the emulator saves reaches Steam's Screenshots view. Steam's own screenshot key (F12, Steam + R1 on the Deck) captures the whole screen under whatever app id Kouch runs as.

## What we build

1. **Every emulator screenshot goes into Steam's library.** While a game runs, Kouch watches that profile's `{screenshots}` folder (non-recursive, new `.png` / `.jpg` / `.tga` files only, once each, after the file stops growing). For each new file it calls `AddScreenshotToLibrary(path, no thumbnail, width, height)`, where the size comes from the image header. It then calls `SetLocation(handle, <game title>)`, so Steam's view says which game it is. The file stays where it is; Steam copies it into its own library.
2. **Steam's screenshot key takes the emulator's clean frame.** While a game runs and its profile has a screenshot hotkey, Kouch calls `HookScreenshots(true)`. Steam's key then raises `ScreenshotRequested` instead of grabbing the screen. Kouch answers by sending the emulator's screenshot hotkey, and step 1 files the result. With no game running, or a profile without a hotkey, Kouch unhooks, so Steam takes its own screenshot as usual (Kouch's own UI included).
3. **A setting:** Settings › Steam (or Display) › **Add game screenshots to Steam**, **on** by default. Off stops steps 1 and 2; screenshots still land in the emulator folder and in Kouch.
4. **Only under Kouch's own app id** (`input::has_own_app_id()`, like Cloud, Workshop and Remote Play Together). Under app 480 the screenshots would be filed under someone else's game, so it's off. Until then the setting's line says "Starts once Kouch is on Steam". Nothing is uploaded by Kouch: Steam's library is local, and sharing or uploading stays the user's choice in Steam.

## Rules

* **Threading (ground rule 4):**
  * ISteamScreenshots isn't ISteamInput, so the calls go through the cloned `steamworks::Client` off the input thread, like `cloud.rs`.
  * The `ScreenshotRequested` callback arrives through Kouch's normal callback pump and is forwarded as an event.
  * No Steam handle is held across an `await`.
* **Only the game's own screenshots:**
  * Nothing outside the profile's `{screenshots}` folder is added.
  * Never the `system` folder or a profile's `private` globs.
  * No file that isn't an image.
* **Brand-free:** the location label is the user's own game title from their library.

## Who and status

| Part                                                                                                                                                                                                                                                                                             | Owner                                               | Status                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| S1 `kouch-steam` wrapper (hook, add, set location, the `ScreenshotRequested` callback) and the app glue (folder watcher per session, the hook while a game runs, the setting, the 480 guard)                                                                                                     | C (Steam integration), with B for the session hooks | done: `kouch-steam::screenshots`, `app/src-tauri/src/steam_screenshots.rs` (the watcher follows `session:state`; 3 levels deep, links never followed); the setting is B's `Settings.steam_screenshots` (4d750fe) |
| S2 The setting in Settings, and its "Starts once Kouch is on Steam" line                                                                                                                                                                                                                         | A                                                   | done (A, `3e3e354`); saving it in the real app fixed with `settings_set` (B, `fd316e2`)                                                                                                                          |
| S3 Guide: where screenshots go                                                                                                                                                                                                                                                                   | docs session                                        | done (docs session, `c1a0638`)                                                                                                                                                                                   |
| S4 Verify: unit tests for the watcher and the guard. Live test once the app id exists: Quick Menu screenshot → Steam's Screenshots view under the game's name, and Steam's key during a game → a clean frame. Under 480 today, only check that it stays off and that Steam's own key still works | central                                             | not started                                                                                                                                                                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kouch.dev/docs/steam_screenshots_plan.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
