Compare commits

..
Author SHA1 Message Date
poli0981andClaude Fable 5.2 7a77b731ea docs(handoff): 0.1.0-beta.50's release facts - the run, the digests, the build ids, the delta, the wiki, the rehearsals, the two dates (#472)
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 07:06:33 +07:00
poli0981andClaude Fable 5.2 5764d218da release: 0.1.0-beta.50 - what a session was played with: controllers and input, read from outside the game; owner-only item 48 (D155-D163; with D152, D154) (#471)
* feat(input): the arithmetic of controller statistics - classes, batteries, makers, one pad seen twice (D155-D163)

Nothing reads a device yet. Domain.Input says whether an XInput state or a DualSense report is a pad in use and what
its battery is, adds a battery's readings up, counts switches and decides when two entries are one pad;
Application.Input holds one session's slices and turns them into a reading a second; InputSessionBuilder turns a
session's readings into its totals, its controllers as JSON and its timeline. TelemetrySample can carry a reading.

Every byte and reading under test was written by hand: no report from a real controller has passed through this code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session can store what it was played with - schema 0024, the .partial file's chunk 11, both tiers (D160)

Nine columns on sessions (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on games (what a store lists of controller support), ADD COLUMN only. The .partial
file gains chunk 11, so a session recovered after the Agent died keeps its readings. SessionFinalizer.Build stores
them before the tier branch: hooked, unhooked and recovered sessions alike. The input series are sensor_blobs rows
named input.*, which the sensors' read now leaves out and FindInputSensorsAsync returns.

Nothing produces a reading yet. A ledger this build has opened cannot be opened by 0.1.0-beta.49 or earlier.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159)

Application.Input.InputReader takes a slice about ten times a second from Infrastructure.Input.Win32InputBackend, on
the thread of InputDeviceHub, which exists only while a session has a view of it. It opens no device, sends nothing
to one and registers for no keyboard or mouse. tools/input-readonly-check.ps1 holds its Windows calls to a list.

With no controller at hand, what the reader does with one connected is not established.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(input): an arm of XInputPad.Battery's switch said what the default says (Qodana, on #464 after it merged)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): no using that makes the file's own qualified names redundant (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): what InspectCode reported in the reader's tests - redundant casts, a hub disposed twice, a suppression not needed

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* wip(input): the Agent records what a session was played with - the switch, the terms, the legal texts

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style(input): import order in the Agent's composition; no redundant qualifier in a test (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* wip(input): what a store lists of controller support, the input libraries, the game page's three rows

* wip(input): the game page's details tests expect the three controller rows; the library names test without ToLowerInvariant

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(guide): the settings page listed Controllers and input twice

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session's summary says what it was played with - the shares, the controllers and their batteries, two charts, marks on the frame-time chart; Trend, Compare and the CSV export (D155-D163)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* release: 0.1.0-beta.50 - what a session was played with: controllers and input, read from outside the game; owner-only item 48 (D155-D163; with D152, D154)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(app): the bar's gap is named by the class that has it; one sentence for the frames session's own sensors

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(app): the fixture's constant is named as the format check wants

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): the last-input time is asked not to go back, not to match .NET's tick - the two differ by the time the PC slept; the finding in 21_INPUT_DEVICES and HANDOFF's traps

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* refactor(app): the notes of a session's input need its controllers' record, not its row

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(handoff): auto-merge does not wait for Qodana - the trap, and what was fixed here

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 06:19:24 +07:00
poli0981andClaude Fable 5.2 fe23342a2a feat(input): a session's summary says what it was played with - shares, controllers and batteries, two charts, marks on the frame-time chart; Trend, Compare, the CSV export (D155-D163) (#470)
* feat(input): the arithmetic of controller statistics - classes, batteries, makers, one pad seen twice (D155-D163)

Nothing reads a device yet. Domain.Input says whether an XInput state or a DualSense report is a pad in use and what
its battery is, adds a battery's readings up, counts switches and decides when two entries are one pad;
Application.Input holds one session's slices and turns them into a reading a second; InputSessionBuilder turns a
session's readings into its totals, its controllers as JSON and its timeline. TelemetrySample can carry a reading.

Every byte and reading under test was written by hand: no report from a real controller has passed through this code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session can store what it was played with - schema 0024, the .partial file's chunk 11, both tiers (D160)

Nine columns on sessions (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on games (what a store lists of controller support), ADD COLUMN only. The .partial
file gains chunk 11, so a session recovered after the Agent died keeps its readings. SessionFinalizer.Build stores
them before the tier branch: hooked, unhooked and recovered sessions alike. The input series are sensor_blobs rows
named input.*, which the sensors' read now leaves out and FindInputSensorsAsync returns.

Nothing produces a reading yet. A ledger this build has opened cannot be opened by 0.1.0-beta.49 or earlier.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159)

Application.Input.InputReader takes a slice about ten times a second from Infrastructure.Input.Win32InputBackend, on
the thread of InputDeviceHub, which exists only while a session has a view of it. It opens no device, sends nothing
to one and registers for no keyboard or mouse. tools/input-readonly-check.ps1 holds its Windows calls to a list.

With no controller at hand, what the reader does with one connected is not established.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(input): an arm of XInputPad.Battery's switch said what the default says (Qodana, on #464 after it merged)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): no using that makes the file's own qualified names redundant (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): what InspectCode reported in the reader's tests - redundant casts, a hub disposed twice, a suppression not needed

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* wip(input): the Agent records what a session was played with - the switch, the terms, the legal texts

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style(input): import order in the Agent's composition; no redundant qualifier in a test (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* wip(input): what a store lists of controller support, the input libraries, the game page's three rows

* wip(input): the game page's details tests expect the three controller rows; the library names test without ToLowerInvariant

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(guide): the settings page listed Controllers and input twice

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session's summary says what it was played with - the shares, the controllers and their batteries, two charts, marks on the frame-time chart; Trend, Compare and the CSV export (D155-D163)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(app): the bar's gap is named by the class that has it; one sentence for the frames session's own sensors

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(app): the fixture's constant is named as the format check wants

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 22:45:09 +00:00
poli0981andClaude Fable 5.2 aa30659313 feat(input): does a game support controllers - what the store lists, the input libraries it loaded, how it was played (D163) (#469)
* feat(input): the arithmetic of controller statistics - classes, batteries, makers, one pad seen twice (D155-D163)

Nothing reads a device yet. Domain.Input says whether an XInput state or a DualSense report is a pad in use and what
its battery is, adds a battery's readings up, counts switches and decides when two entries are one pad;
Application.Input holds one session's slices and turns them into a reading a second; InputSessionBuilder turns a
session's readings into its totals, its controllers as JSON and its timeline. TelemetrySample can carry a reading.

Every byte and reading under test was written by hand: no report from a real controller has passed through this code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session can store what it was played with - schema 0024, the .partial file's chunk 11, both tiers (D160)

Nine columns on sessions (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on games (what a store lists of controller support), ADD COLUMN only. The .partial
file gains chunk 11, so a session recovered after the Agent died keeps its readings. SessionFinalizer.Build stores
them before the tier branch: hooked, unhooked and recovered sessions alike. The input series are sensor_blobs rows
named input.*, which the sensors' read now leaves out and FindInputSensorsAsync returns.

Nothing produces a reading yet. A ledger this build has opened cannot be opened by 0.1.0-beta.49 or earlier.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159)

Application.Input.InputReader takes a slice about ten times a second from Infrastructure.Input.Win32InputBackend, on
the thread of InputDeviceHub, which exists only while a session has a view of it. It opens no device, sends nothing
to one and registers for no keyboard or mouse. tools/input-readonly-check.ps1 holds its Windows calls to a list.

With no controller at hand, what the reader does with one connected is not established.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(input): an arm of XInputPad.Battery's switch said what the default says (Qodana, on #464 after it merged)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): no using that makes the file's own qualified names redundant (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): what InspectCode reported in the reader's tests - redundant casts, a hub disposed twice, a suppression not needed

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* wip(input): the Agent records what a session was played with - the switch, the terms, the legal texts

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style(input): import order in the Agent's composition; no redundant qualifier in a test (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* wip(input): what a store lists of controller support, the input libraries, the game page's three rows

* wip(input): the game page's details tests expect the three controller rows; the library names test without ToLowerInvariant

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(guide): the settings page listed Controllers and input twice

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 22:15:54 +00:00
poli0981andClaude Fable 5.2 a6bebc4adf feat(input): the Agent records what a session was played with - the switch, the terms, Privacy Policy 2.22 and Disclaimer 2.18 (D155, D156, D160, D161) (#468)
* feat(input): the arithmetic of controller statistics - classes, batteries, makers, one pad seen twice (D155-D163)

Nothing reads a device yet. Domain.Input says whether an XInput state or a DualSense report is a pad in use and what
its battery is, adds a battery's readings up, counts switches and decides when two entries are one pad;
Application.Input holds one session's slices and turns them into a reading a second; InputSessionBuilder turns a
session's readings into its totals, its controllers as JSON and its timeline. TelemetrySample can carry a reading.

Every byte and reading under test was written by hand: no report from a real controller has passed through this code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session can store what it was played with - schema 0024, the .partial file's chunk 11, both tiers (D160)

Nine columns on sessions (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on games (what a store lists of controller support), ADD COLUMN only. The .partial
file gains chunk 11, so a session recovered after the Agent died keeps its readings. SessionFinalizer.Build stores
them before the tier branch: hooked, unhooked and recovered sessions alike. The input series are sensor_blobs rows
named input.*, which the sensors' read now leaves out and FindInputSensorsAsync returns.

Nothing produces a reading yet. A ledger this build has opened cannot be opened by 0.1.0-beta.49 or earlier.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159)

Application.Input.InputReader takes a slice about ten times a second from Infrastructure.Input.Win32InputBackend, on
the thread of InputDeviceHub, which exists only while a session has a view of it. It opens no device, sends nothing
to one and registers for no keyboard or mouse. tools/input-readonly-check.ps1 holds its Windows calls to a list.

With no controller at hand, what the reader does with one connected is not established.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(input): an arm of XInputPad.Battery's switch said what the default says (Qodana, on #464 after it merged)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): no using that makes the file's own qualified names redundant (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): what InspectCode reported in the reader's tests - redundant casts, a hub disposed twice, a suppression not needed

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* wip(input): the Agent records what a session was played with - the switch, the terms, the legal texts

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style(input): import order in the Agent's composition; no redundant qualifier in a test (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 21:53:04 +00:00
poli0981andClaude Fable 5.2 e3dab94834 feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159) (#467)
* feat(input): the arithmetic of controller statistics - classes, batteries, makers, one pad seen twice (D155-D163)

Nothing reads a device yet. Domain.Input says whether an XInput state or a DualSense report is a pad in use and what
its battery is, adds a battery's readings up, counts switches and decides when two entries are one pad;
Application.Input holds one session's slices and turns them into a reading a second; InputSessionBuilder turns a
session's readings into its totals, its controllers as JSON and its timeline. TelemetrySample can carry a reading.

Every byte and reading under test was written by hand: no report from a real controller has passed through this code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): a session can store what it was played with - schema 0024, the .partial file's chunk 11, both tiers (D160)

Nine columns on sessions (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on games (what a store lists of controller support), ADD COLUMN only. The .partial
file gains chunk 11, so a session recovered after the Agent died keeps its readings. SessionFinalizer.Build stores
them before the tier branch: hooked, unhooked and recovered sessions alike. The input series are sensor_blobs rows
named input.*, which the sensors' read now leaves out and FindInputSensorsAsync returns.

Nothing produces a reading yet. A ledger this build has opened cannot be opened by 0.1.0-beta.49 or earlier.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(input): the input reader, which the Agent does not start yet - raw input for controllers, XInput, the time of the last input (D155, D158, D159)

Application.Input.InputReader takes a slice about ten times a second from Infrastructure.Input.Win32InputBackend, on
the thread of InputDeviceHub, which exists only while a session has a view of it. It opens no device, sends nothing
to one and registers for no keyboard or mouse. tools/input-readonly-check.ps1 holds its Windows calls to a list.

With no controller at hand, what the reader does with one connected is not established.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(input): an arm of XInputPad.Battery's switch said what the default says (Qodana, on #464 after it merged)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): no using that makes the file's own qualified names redundant (InspectCode)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(input): what InspectCode reported in the reader's tests - redundant casts, a hub disposed twice, a suppression not needed

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 16:20:55 +00:00
105 changed files with 5807 additions and 333 deletions

No files matched your search

+8 -2
View File
@@ -9,7 +9,7 @@ barrier. It is written for the person who has just met one; the details for deve
FrameLedger is a desktop program: its own window, its dialogs, its document windows, the icon by the clock and the
notices Windows shows for it. It draws nothing inside a game, so it cannot make a game itself any easier to use.
*Beta software: this page describes version 0.1.0-beta.49. In the app: Help ▸ Accessibility.*
*Beta software: this page describes version 0.1.0-beta.50. In the app: Help ▸ Accessibility.*
## What FrameLedger aims for
@@ -79,7 +79,10 @@ The same keys are in the user guide, [The screens](guide/07-screens.md#keyboard-
- Labels such as *Hooking on* and *Not installed*, and the ray-tracing chips, always carry their words; a chip that reads
*N/A* is also drawn with a dashed edge.
- **No chart tells two series apart by colour alone**: its lines are solid, dashed or dotted, its points circles,
triangles or squares, its shaded stretches striped or dotted.
triangles or squares, its shaded stretches striped or dotted. The chart of what a session was played with puts each
way of playing on a row of its own, named on the axis.
- **A bar of shares** — frame generation, what a session was played with — is announced with every share in its
name, and the table beside it has every number in text, each row with a swatch of its colour.
### Languages
@@ -113,6 +116,9 @@ Each one with what to do instead. A barrier that is not on this list is worth re
- **A chart's points cannot be read one by one.** A screen reader hears the chart's name and where its numbers are:
a session's figures and *Statistics per series* in its summary, the table under the Compare chart, the Sessions table
and the list of changes under a trend chart, and **File ▸ Export ▸ Session CSV** or **Session JSON**.
- **Under a Windows contrast theme, two of the four parts of the "Played with" bar share a colour** — a contrast
theme has few colours. They are never next to each other, a gap separates every part, and the table under the bar
names each with its share.
- **In the user guide and the other documents the app shows, headings are read as ordinary text**: Windows' document
view gives them no heading role. Their links and their order work as on any page.
- **The short messages at the bottom of the window close after four seconds**, and cannot be read again once closed. A
+5 -60
View File
@@ -35,68 +35,12 @@ numeric core and does not move; the heading is the full version — corrected 20
## [Unreleased]
### Added
- **For developers: the arithmetic of controller statistics, with nothing reading a device yet** (D155–D163, the
owner's decisions of 2026-11-14; `docs/21_INPUT_DEVICES.md`, `docs/03_METRICS.md` §Input). `FrameLedger.Domain.Input`
says whether an XInput state or a DualSense report is a pad in use and what its battery is, adds a battery's readings
up, counts switches, and decides when two entries are one pad seen twice; `Application.Input` holds one session's
slices and turns them into a reading a second; `InputSessionBuilder` turns a session's readings into its totals, its
controllers as JSON and its timeline. A telemetry sample can carry a reading; none does. **Every byte and reading
under test was written by hand — no report from a real controller has passed through this code.**
- **For developers: a session can store what it was played with — schema 0024** (D160; `docs/06_DATA_MODEL.md`). Nine
columns on `sessions` (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on `games` (what a store lists of controller support), ADD COLUMN only; the
`.partial` file gains chunk 11, so a session recovered after the Agent died keeps its readings; the finalizer
stores them for hooked and unhooked sessions alike; the input series are `sensor_blobs` rows named `input.*`, which
the sensors' read leaves out. Nothing produces a reading yet. **A ledger this build has opened cannot be opened by
0.1.0-beta.49 or earlier.**
- **For developers: the input reader, which the Agent does not start yet** (D155, D158, D159; `docs/21_INPUT_DEVICES.md`
§The reader). `Application.Input.InputReader` takes a slice about ten times a second from
`Infrastructure.Input.Win32InputBackend` — raw input for joysticks and gamepads delivered to a window that is never
shown, three of XInput's getters, the time of the last keyboard or mouse input, the window in front — on the thread
of `InputDeviceHub`, which exists only while a session has a view of it. It opens no device, sends nothing to one,
and registers for no keyboard or mouse. A new gate, `tools/input-readonly-check.ps1`, holds the reader's Windows
calls to a committed list and refuses, on the list or off it, a call that sends to a device, injects input or reads
a key; no other managed source and no native source may name an input function. **With no controller at hand, what
the reader does with one connected is not established**: its tests use a Windows whose answers they write, and one
suite runs it on the real Windows of the machine and asserts only that it opens, answers and closes.
### Changed
- **Advanced metrics is closed: the ten readings that were "being studied" are now "not read", with the reason**
(D154, the owner's decision). What a game sets and asks through Streamline's own functions for a feature — DLSS
frame generation's options and state, the video memory DLSS estimates for itself, the options of ray
reconstruction, Image Scaling and Dynamic Vibrance, the PC-latency markers — is reached only by handing the game
a function of FrameLedger's in place of Streamline's, which is refused. The *Sources* list says so, in English,
Vietnamese and Japanese, and the guide no longer says a later release reads more. Nothing that was read stops
being read.
- **The two lines of the graphics card's time say what each is, not which holds the other** (D152, the owner's
decision). *GPU active render (idle time excluded)* and *GPU render, start to end (idle time included)* are now
*GPU active render (the driver's own figure)* and *GPU render (between the driver's start and end marks)*, in
English, Vietnamese and Japanese, and the guide says why: in Cyberpunk 2077 without frame generation the
driver's active time is longer than its two marks are apart. The numbers are unchanged.
- **The guide's page on Advanced metrics says what two of the driver's switches mean** (`guide/12`): the latency
report is there in a game that has Reflex built in, whether Reflex is on or off in its menu; `bUseGameSleep`
says the game calls Reflex's sleep — NVIDIA asks for that even with Reflex off — and `bLowLatencyMode` is the
one that says the mode is on; frame generation needs Reflex, not the reverse. From NVIDIA's Streamline guide
for Reflex, and from the owner's ten sessions on 0.1.0-beta.49.
### Documentation
- **Owner-only item 47 was run and read** (`docs/HANDOFF.md`): in Cyberpunk 2077 without frame generation the
driver's active GPU time is longer than its own two marks are apart on 4 917 of 5 394 frames (1 849 µs beside
1 571 µs) and on none of 129 900 frames in five other games — the difference is the driver's; samples without a
report are now confined to a game's start; a session with the option off has no latency line; and the stop of
D141 fired in a real game for the first time (Kingdom Come: Deliverance II, one call of 5.3 ms while it
started).
- **Streamline's programming guides for Reflex and for DLSS Ray Reconstruction (2.14.16) read against the code**
(`docs/spike-notes/30-reflex-latency.md`, *Added 2026-11-14*). Ray reconstruction was already measured the way
the guide describes; two comments in the Overlay's source and one line of `17_HOOK_ENGINE` said super
resolution and ray reconstruction run together, and they do not. `03_METRICS` and `05_DETECTION` no longer
promise "PC latency as reported by Reflex" (D147). No code changed: comments only.
- **0.1.0-beta.50's release facts are recorded** (`docs/HANDOFF.md` §Left open by this session): the run, the eight
assets and their digests, the build id in the five native libraries, the delta, the wiki, the rehearsals, what
SonarCloud and Qodana said of the released commit — and that the release shows two dates, the owner's day in
the documents and UTC's on GitHub and in the legal texts.
## Releases
@@ -104,6 +48,7 @@ Newest first. Each file holds that release's section exactly as it stood here.
| Version | Date | Notes |
|---|---|---|
| `0.1.0-beta.50` | 2026-11-15 | [`docs/changelog/0.1.0-beta.50.md`](docs/changelog/0.1.0-beta.50.md) |
| `0.1.0-beta.49` | 2026-11-14 | [`docs/changelog/0.1.0-beta.49.md`](docs/changelog/0.1.0-beta.49.md) |
| `0.1.0-beta.48` | 2026-11-14 | [`docs/changelog/0.1.0-beta.48.md`](docs/changelog/0.1.0-beta.48.md) |
| `0.1.0-beta.47` | 2026-11-14 | [`docs/changelog/0.1.0-beta.47.md`](docs/changelog/0.1.0-beta.47.md) |
+17 -1
View File
@@ -6,7 +6,7 @@ Read this file first, then the reading order at the bottom. **`docs/19_SAFETY_AN
## Architecture in one paragraph
A C++ DLL (`FrameLedger.Overlay.dll`) is injected into games the user explicitly enabled. It hooks the presentation path (DXGI for D3D11/D3D12, plus OpenGL) and the upscaler/RT APIs, writes fixed-size frame records into a lock-free shared-memory ring, and never blocks. A C# Agent drains that ring at ~10 Hz, enriches with GPU telemetry from vendor APIs, and writes sessions to SQLite. A WPF UI reads SQLite. Vulkan uses an implicit **layer** instead of hooking. If injection is refused or fails there is **no measurement**: the session records duration, hardware telemetry and the reason, and every measured field reads `N/A` (Tier 2, owner decision 2026-08-28).
A C++ DLL (`FrameLedger.Overlay.dll`) is injected into games the user explicitly enabled. It hooks the presentation path (DXGI for D3D11/D3D12, plus OpenGL) and the upscaler/RT APIs, writes fixed-size frame records into a lock-free shared-memory ring, and never blocks. A C# Agent drains that ring at ~10 Hz, enriches with GPU telemetry from vendor APIs, and writes sessions to SQLite. A WPF UI reads SQLite. Vulkan uses an implicit **layer** instead of hooking. If injection is refused or fails there is **no measurement**: the session records duration, hardware telemetry and the reason, and every measured field reads `N/A` (Tier 2, owner decision 2026-08-28) — **and, since owner decision D161 (2026-11-14), what the Agent reads from outside the game**: the game process's memory (beta.12, D43) and which controllers, or the keyboard and mouse, the session was played with (`docs/21_INPUT_DEVICES.md`). Nothing measured inside the game is among them.
## Non-negotiable rules
@@ -147,6 +147,21 @@ src/
# (LATENCY_FRAMES, a batch per state of the sleep status; nothing published or
# stored); its watchdog's periodic tick is on a grid (fl_watchdog_tick.h), and
# Recording/PendingInGameReadings keeps the reading that waits for a sample.
# Controllers and input (0.1.0-beta.50, owner decisions D155-D163, docs/21_INPUT_DEVICES):
# Input/ - InputReader (a slice ten times a second over the port IInputBackend),
# InputTickAccumulator (one session's slices into a reading a tick), InputTerms (the
# reading waits for Privacy Policy 2.22, D156), the ports IInputDevices /
# IInputActivitySource; Recording/InputSessionBuilder (totals, the controllers as JSON,
# the input.* series; schema 0024). Domain/Input holds the arithmetic and the two
# parsers (an XInput state, a DualSense report). Infrastructure/Input is the Windows
# side: Win32InputBackend (raw input for joysticks and gamepads, three XInput getters,
# GetLastInputInfo - it opens no device and sends nothing to one) and InputDeviceHub
# (one thread for the Agent, only while a session has a view). Read from OUTSIDE the
# game, both tiers; `capture.input_devices`, on by default.
# The App shows it since the same release: Services/InputPresentation (a session's
# "Played with", from the stored row), Controls/ShareBar with InputShareBar and FgMixBar,
# Charts/InputSeries with two charts and the controller marks on FrametimeChart,
# Services/ControllerEvidence (a game's page: three pieces of evidence, no verdict, D163).
FrameLedger.Infrastructure/ # SQLite, shm reader, vendor APIs, injector interop, parsers,
# and Capture/ (PR-C): ShmRingAttacher/ShmCaptureSink over the
# reader, HeldProcessLivenessSource, TargetResolver (path only,
@@ -232,6 +247,7 @@ guide/ # the user guide (beta.12, D44): ~~eight~~ short
# App (Help > User guide); README.md is its contents. docs/ is for developers.
# (twelve since beta.17, D54: the screens, every setting, troubleshooting, a glossary;
# and the guide is the wiki's End-user part)
# (since 0.1.0-beta.50 also 13-controllers.md, Controllers and input)
wiki/ # the wiki's own pages (beta.17, D53): Home, _Sidebar, the developer pages. wiki.yml
# publishes them with guide/, LIMITATIONS.md and ACCESSIBILITY.md to the Wiki tab at a release;
# tools/wiki-build.ps1 assembles and checks them (build.ps1 wiki-check)
+37 -2
View File
@@ -5,7 +5,7 @@ hooking on for — and reading the graphics calls the game makes. That is why it
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
page lists them in plain words; each item links to the document that has the details.
*Beta software: this page describes version 0.1.0-beta.49.*
*Beta software: this page describes version 0.1.0-beta.50.*
## Games it will not measure
@@ -36,7 +36,8 @@ page lists them in plain words; each item links to the document that has the det
When a game is not measured — any of the reasons above — its session still records **how long it ran, the
machine's sensors (GPU temperature, load, power; CPU load; memory), how much memory the game itself used (read from
Windows, outside the game) and why nothing was measured.** Every
Windows, outside the game), what it was played with ([Controllers and input](#controllers-and-input)) and why nothing
was measured.** Every
frame-rate, upscaler, frame-generation and ray-tracing value reads **N/A**, never 0. How the game's window was
shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
@@ -149,6 +150,40 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
N/A for video memory. AMD and Intel graphics cards have not been tested.
([Metrics](docs/03_METRICS.md))
## Controllers and input
Since 0.1.0-beta.50 a session records what it was played with. All of it is read from Windows, from outside the
game — so it is there for a game FrameLedger does not measure as well.
- **It says a controller was in use while the game was in front — not what the game did with it.** A controller
held while a game ignores it reads as a controller in use.
- **Keyboard and mouse are one figure.** FrameLedger reads only the time of the last keyboard or mouse input; it
cannot tell the two apart, and never reads a key.
- **Input a program makes counts as keyboard and mouse**: Steam Input mapping a controller to keys, a macro tool, a
remapper. A controller mapped that way reads as *both*.
- **Only the time the game is in front counts.** A game whose window belongs to another process than the one
FrameLedger follows reads as never in front, and has no shares.
- **Xbox-compatible controllers and the DualSense are read for use.** Any other controller — a DualShock 4, a
Switch Pro controller — is listed with its connections and disconnections and is never counted as in use.
- **A controller that Windows presents as an Xbox pad is "Xbox"**, whoever made it. Its model is named only when it
cannot be mistaken for another one that is connected.
- **Battery.** An Xbox controller on a cable reads "wired"; on Bluetooth it may report nothing. A DualSense on
Bluetooth reports its battery only where Steam or the game has switched it to its long report — FrameLedger never
asks a controller for anything. An Xbox controller's level is four words, a DualSense's is in steps of ten per
cent.
- **Steam Input shows a controller twice** — the one you hold and an Xbox pad Steam presents for it. FrameLedger
folds the two into one when they move together; with another remapper it may list two.
- **"Does this game support controllers?" has no single answer here.** The game's page shows what Steam lists
(read from the Steam app's file on your PC — only Steam games have it, and only on a PC where Steam knows the
game), which input libraries the game loaded the last time it was measured from inside (several engines load one
whether the game uses a controller or not), and how you have actually played it. FrameLedger does not turn them
into a Yes or a No. ([Detection](docs/05_DETECTION.md))
- **Nothing is read until you have accepted the Privacy Policy that describes it.** After an update, sessions
recorded before FrameLedger has been opened once have no such figures, and say so in their notes.
- **None of this had been read from a real controller when 0.1.0-beta.50 was written.** It was checked against data
written by hand; what real controllers do is in the developer's notes once the owner has tried them.
([Input devices](docs/21_INPUT_DEVICES.md))
## Display mode (full-screen, borderless, windowed)
- **Exclusive full-screen is known only for a measured Direct3D (DXGI) game** — the game's own swap chain
+13 -3
View File
@@ -13,7 +13,7 @@ app too (Help ▸ User guide, Help ▸ Limitations, Help ▸ Accessibility), and
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-11-11.** The software is a beta; its latest
> **beta is `0.1.0-beta.49`** (2026-11-14), an unsigned installer built from that tag with its
> **beta is `0.1.0-beta.50`** (2026-11-15), an unsigned installer built from that tag with its
> checksums published beside it (alphas — experimental builds that try a newer .NET — are published apart). The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -107,6 +107,16 @@ app too (Help ▸ User guide, Help ▸ Limitations, Help ▸ Accessibility), and
> temperature in every session, and, on NVIDIA cards only, how much of the time its power limit or its temperature held
> it back, read once a second; and frames per watt — the game's own frames per second for each watt the graphics card
> drew, never counting generated frames, `N/A` where the game's own frame rate is not known.
> - **Controllers and input (since beta.50; on unless you switch it off in Settings, and only once you have accepted
> the Privacy Policy that describes it):** how much of the time a game was in front it was played with a
> controller, with the keyboard or mouse, with both or with neither; each controller's connections and drops; its
> battery. All of it is read from Windows, from outside the game: it says a controller was in use while the game
> was in front, not what the game did with it. Keyboard and mouse are one figure — only the time of the last input
> is read — and input a program injects (Steam Input mapping a controller to keys, a macro tool) counts as keyboard
> and mouse. An Xbox-compatible controller and a DualSense are read for use; another maker's controller is listed
> and never counted as in use. A DualSense on Bluetooth reports its battery only where Steam or the game has
> switched it to its long report, and an Xbox controller on Bluetooth may report none. **None of this had been
> read from a real controller when it was written (2026-11-14)**: it was checked against data written by hand.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
@@ -188,7 +198,7 @@ FrameLedger is built to keep that risk small and to be honest about it:
| **Off by default** | Injection is disabled for every game until you enable it individually, after a consent prompt |
| **Hard refusal** | Known anti-cheat/anti-tamper components are detected before injection and every 30 s during a session. Detected ⇒ FrameLedger refuses, or stops capturing at the next scan — so up to 30 s can pass before it reacts to anti-cheat that loads mid-session. For Direct3D/OpenGL that means hooks are removed; for Vulkan it means the layer goes passthrough, because a layer cannot leave the loader chain of a running game. **There is no override — not in settings, not in a config file, not on the command line**<br><br>**One narrow exception since beta.9 (owner decisions D33, D38):** per game, after its own disclosure and only while a Settings option (off by default) is on, a game whose only finding is one anti-cheat that runs entirely in user mode — no driver file in its folder, on no title list — may be hooked under a user-mode exception. ~~and that FrameLedger has measured successfully at least twice~~ *(corrected 2026-10-03: since beta.11, D38, a grant needs no earlier session; its first two hooked sessions are a trial, and one that does not go well ends it for good.)* The guard still runs every check under it, refuses anything else it finds, and ends it on anything new; a ban remains possible (`legal/DISCLAIMER.md` §2A).<br><br>✅ **Both halves run since 2026-09-10.** The *pre-injection* refusal runs every documented check, and during every capture the Agent re-runs them every 30 s: the component inside the game removes its hooks within one frame of being told to, and within 65 s if it stops hearing from the scanner. *(Until 2026-09-15 this cell said the in-session re-scan did not run at all, which stopped being true when the Agent's capture loop landed.)* For a Vulkan title the stop is the layer's own: it checks the scanner's counter on every present and goes passthrough within one present of the stop flag, or after 65 s without a scan — a title that has stopped presenting is not stopped by that deadline, and presents nothing to be observed either. |
| **No evasion, ever** | FrameLedger does not hide, rename, obfuscate, or disguise itself. It keeps its real name, real exports, and version info. It is meant to be plainly visible to any security software that looks. This is an architectural rule, not a setting |
| **Read-only** | It never reads or writes game memory, never modifies game behavior, never touches saves or input, and never changes GPU clocks, fans, or power limits |
| **Read-only** | It never reads or writes game memory, never modifies game behavior, never touches saves, never reads what you type or which buttons you press — from outside the game it notes only whether a controller, or the keyboard or mouse, is in use — and never changes GPU clocks, fans, or power limits |
| **Always a way out** | FrameLedger refuses rather than pushes through. When the guard finds anti-cheat, or the hook fails, or you have not enabled a game, it **stops** — and records the session anyway: start, end, duration, whatever hardware sensors your machine provides, and the reason there is nothing else. Every measured value reads `N/A`; it never estimates one.<br><br>**The way out is that it does not inject, not that it measures another way.** An earlier version of this row promised a no-injection measurement mode. It was designed around Intel PresentMon, that was dropped on 2026-08-27 after measurement, and no replacement was chosen — so **frame times require hooking**. Said in this row rather than a footnote because the row is in the SAFETY table, and a reader deciding whether to enable a game needs the real alternative, not a comfortable one |
**FrameLedger is for offline and single-player games.** If you enable it for anything with an online or competitive component, that is your call and your responsibility. The developer cannot reverse a ban. Please read [`legal/DISCLAIMER.md`](legal/DISCLAIMER.md) and [`docs/19_SAFETY_AND_ANTICHEAT.md`](docs/19_SAFETY_AND_ANTICHEAT.md) before enabling it for anything.
@@ -215,7 +225,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
## Install
> **The latest beta is `v0.1.0-beta.49` (2026-11-14); before it `v0.1.0-beta.48` (2026-11-14), `v0.1.0-beta.47` (2026-11-14), `v0.1.0-beta.46` (2026-11-13), `v0.1.0-beta.45` (2026-11-12), `v0.1.0-beta.44` (2026-11-12), `v0.1.0-beta.43` (2026-11-12), `v0.1.0-beta.42` (2026-11-12), `v0.1.0-beta.41` (2026-11-12), `v0.1.0-beta.40` (2026-11-12), `v0.1.0-beta.39` (2026-11-11), `v0.1.0-beta.38` (2026-11-11), `v0.1.0-beta.37` (2026-11-11), `v0.1.0-beta.36` (2026-11-10), `v0.1.0-beta.35` (2026-11-09), `v0.1.0-beta.34` (2026-11-06), `v0.1.0-beta.33` (2026-11-03), `v0.1.0-beta.32` (2026-10-31), `v0.1.0-beta.31` (2026-10-26), `v0.1.0-beta.30` (2026-10-26), `v0.1.0-beta.29` (2026-10-25), `v0.1.0-beta.28` (2026-10-20), `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
> **The latest beta is `v0.1.0-beta.50` (2026-11-15); before it `v0.1.0-beta.49` (2026-11-14), `v0.1.0-beta.48` (2026-11-14), `v0.1.0-beta.47` (2026-11-14), `v0.1.0-beta.46` (2026-11-13), `v0.1.0-beta.45` (2026-11-12), `v0.1.0-beta.44` (2026-11-12), `v0.1.0-beta.43` (2026-11-12), `v0.1.0-beta.42` (2026-11-12), `v0.1.0-beta.41` (2026-11-12), `v0.1.0-beta.40` (2026-11-12), `v0.1.0-beta.39` (2026-11-11), `v0.1.0-beta.38` (2026-11-11), `v0.1.0-beta.37` (2026-11-11), `v0.1.0-beta.36` (2026-11-10), `v0.1.0-beta.35` (2026-11-09), `v0.1.0-beta.34` (2026-11-06), `v0.1.0-beta.33` (2026-11-03), `v0.1.0-beta.32` (2026-10-31), `v0.1.0-beta.31` (2026-10-26), `v0.1.0-beta.30` (2026-10-26), `v0.1.0-beta.29` (2026-10-25), `v0.1.0-beta.28` (2026-10-20), `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
1. Download the latest `FrameLedger.App-win-Setup.exe` from [Releases](https://github.com/poli0981/frameledger/releases). It installs into `%LOCALAPPDATA%\FrameLedger.App`; your data stays in `%LOCALAPPDATA%\FrameLedger`, and uninstalling asks before touching it.
2. SmartScreen may warn — releases are not code-signed (free, open-source project). Verify the SHA-256 checksum published with each release, then **More info → Run anyway**.
+20
View File
@@ -102,6 +102,26 @@ Tray icon states (idle / capturing T1 / capturing T2 / paused); menu; toasts for
### FR-15 In-game overlay *(v1.1, opt-in, off by default)*
Draw live FPS/frametime/upscaler info inside the game. Only for games already hooked; a separate toggle; never on by default. Deferred until the data path is stable (`15_ROADMAP` P5).
### FR-16 Controllers and input *(owner decisions D155–D163, 2026-11-14)*
What a session was played with, read by the Agent from outside the game — so for hooked and unhooked sessions alike (`21_INPUT_DEVICES`, `03_METRICS` §Input).
- FR-16.1 The share of the time the game was in front that it was played with a controller, with the keyboard or mouse (one class), with both, with neither; the number of switches between a controller and the keyboard and mouse.
- FR-16.2 Each controller: its maker and model by its USB ids, how it is connected, its connections and disconnections during the session, the time it was in use.
- FR-16.3 Each controller's battery: the time at each level, the level that lasted longest, the first and the last, a rate where one can be worked out.
- FR-16.4 Each maker's share of the time controllers were in use, and the number of switches between makers. A pad that is one controller seen twice (Steam Input) counts once.
- FR-16.5 Whether a game supports controllers, as evidence and never a verdict: what the store's own file on the disk says, which input libraries the game loaded, how it was played (D163).
- FR-16.6 An option, **on unless switched off**, that reads nothing until the Privacy Policy describing it has been accepted on the PC (D156). Off means nothing is read or stored.
- FR-16.7 Never read or stored: which button, stick, trigger or key; text; the mouse's position; a serial number, a Bluetooth address, a device path. Nothing is ever sent to a controller (D159). Held by `tools/input-readonly-check.ps1`.
### FR-16 Controllers and input *(owner decisions D155–D163, 2026-11-14)*
What a session was played with, read by the Agent from outside the game — so for hooked and unhooked sessions alike (`21_INPUT_DEVICES`, `03_METRICS` §Input).
- FR-16.1 The share of the time the game was in front that it was played with a controller, with the keyboard or mouse (one class), with both, with neither; the number of switches between a controller and the keyboard and mouse.
- FR-16.2 Each controller: its maker and model by its USB ids, how it is connected, its connections and disconnections during the session, the time it was in use.
- FR-16.3 Each controller's battery: the time at each level, the level that lasted longest, the first and the last, a rate where one can be worked out.
- FR-16.4 Each maker's share of the time controllers were in use, and the number of switches between makers. A pad that is one controller seen twice (Steam Input) counts once.
- FR-16.5 Whether a game supports controllers, as evidence and never a verdict: what the store's own file on the disk says, which input libraries the game loaded, how it was played (D163).
- FR-16.6 An option, **on unless switched off**, that reads nothing until the Privacy Policy describing it has been accepted on the PC (D156). Off means nothing is read or stored.
- FR-16.7 Never read or stored: which button, stick, trigger or key; text; the mouse's position; a serial number, a Bluetooth address, a device path. Nothing is ever sent to a controller (D159). Held by `tools/input-readonly-check.ps1`.
## Non-functional requirements
- **NFR-1 Game-side overhead:** ≤ 1 µs per present, ≤ 8 MB resident, measured game FPS impact ≤ 0.5% vs uninstrumented.
+1 -1
View File
@@ -1111,4 +1111,4 @@ Per-column sources, and what a *Tier-2* export does instead:
| `vram_mb` | `vram_proc` per-frame blob. ~~Note the value is refreshed at 1 Hz (`17_HOOK_ENGINE` §Memory) so it is a held sample, not a per-frame measurement — the header block says so~~ **Corrected 2026-10-03: the Overlay never produced it, so the column has always been empty.** It stays in the list — the schema is fixed — and the header's note says so; the game's memory is the `# game_memory:` header line (beta.12, §Game process memory) | `N/A` |
| `reflex_latency_us` | `latency_us` blob; **finalize must write it** | `N/A` |
Plus a `#`-prefixed header block: game, date, **capture tier**, api, present mode, swap effect, **the display line** (beta.10: `# display:` with each mode's milliseconds, the changes, the source and the window / back buffer / monitor sizes, or `N/A` for a session recorded before — §Display mode; a mode is the session's, not a frame's, so it is not a column), hardware snapshot, segment list, the tri-state flags with their sources, ~~and the note that `vram_mb` is 1 Hz-sampled~~ **the game's memory** (beta.12: `# game_memory:` with the dedicated GPU memory's mean / median / max, the shared max, the private working set's mean / median / max, the working set's and the commit's max — MiB, invariant — the process count and the sources, or `N/A` for a session recorded before or one where nothing answered; the session's figure, read once a second, so a header line like the display's), and the note that `vram_mb` is the in-game figure this build does not produce. The tier belongs in the header because a Tier-2 export is missing whole columns and anyone reading it later must know why.
Plus a `#`-prefixed header block: game, date, **capture tier**, api, present mode, swap effect, **the display line** (beta.10: `# display:` with each mode's milliseconds, the changes, the source and the window / back buffer / monitor sizes, or `N/A` for a session recorded before — §Display mode; a mode is the session's, not a frame's, so it is not a column), hardware snapshot, segment list, the tri-state flags with their sources, ~~and the note that `vram_mb` is 1 Hz-sampled~~ **the game's memory** (beta.12: `# game_memory:` with the dedicated GPU memory's mean / median / max, the shared max, the private working set's mean / median / max, the working set's and the commit's max — MiB, invariant — the process count and the sources, or `N/A` for a session recorded before or one where nothing answered; the session's figure, read once a second, so a header line like the display's), **what the session was played with** (0.1.0-beta.50, D160: `# input:` with the milliseconds read, in front, with a controller, with the keyboard and mouse, with both and with neither, the method switches, the sources, then each controller — its number, maker, model, connection, the milliseconds in use and connected, its connects and disconnects — or `N/A` for a session where nothing was read; both tiers, invariant, §Input; never a button, a key, a serial number or an address, which the row does not have), and the note that `vram_mb` is the in-game figure this build does not produce. The tier belongs in the header because a Tier-2 export is missing whole columns and anyone reading it later must know why.
+2 -1
View File
@@ -350,6 +350,7 @@ What the Agent checks **before** asking the guard is the thing the native side s
|---|---|---|---|
| **Session loop** (`CaptureSession.RunAsync`, one async loop per session) | `Task.Delay(100 ms)` drain ticks; the 30 s guard scan is awaited inline | The ring reader, for the life of the session — drain, `PublishGuardResult`, `SetPaused`, `RequestLogFlush` — and the record buffer it fills | Samples foreground and the display mode per tick (beta.10), drains the telemetry queue per tick (PR-D), writes `.partial` itself (PR-D) |
| **Telemetry** (`fl-telemetry`, `TelemetryPoller`, one per session) | 1 Hz, never faster than 500 ms | Its own `ConcurrentQueue` of `TelemetrySample` | Reads the composite source only; L2 has a thread of its own inside the library, and the composite is read from this thread and no other |
| **Input** (`fl-input`, `InputDeviceHub`, **one for the Agent**, since 0.1.0-beta.50) | A slice every 100 ms, only while a session has a view of it — with none there is no thread, no window, no registration | The message-only window raw input is delivered to, and the registration for joysticks and gamepads; the reader's device table | Raw input's buffer, three XInput getters, `GetLastInputInfo`, the window in front. Hands each slice to every session's view under one lock; the telemetry thread takes a view's sum once a tick. Opens no device, sends nothing to one (`21_INPUT_DEVICES`) |
| **Watcher** (built 2026-09-10, PR-F: `CaptureOrchestrator.RunAsync` on a `PeriodicTimer(1 s)`) | 1 Hz process snapshot | The watcher's events and the running-session table — ~~`PollOnceAsync` is their only writer; there is no `Channel`, because there is no second consumer~~ **since 2026-09-13 (P3 PR-1b) the table has one lock**: `PollOnceAsync` on the timer, `LaunchAsync` and `StopSession` from the pipe's tasks (HANDOFF §P3 D12 as built — two commands do not justify a channel); the sessions themselves never take it | The `games` rows (one read per poll) and never the ring; each session it starts runs on its own task |
| **Finalize** (PR-D) | Once, on the session loop's task | The one SQLite connection, behind a `SemaphoreSlim(1)` | `ApplicationStopping` cancels the loop; finalize gets a grace window, then the `.partial` stays for recovery |
| **Pipe** (built 2026-09-13, P3 PR-1: `PipeServer.RunAsync` accepting, one reader and one writer task per client) | Per frame | Each client's bounded outbound queue (drop-oldest, so a publisher never waits) and the answer to each request | `Hello` / `GetStatus` / `Ping` read `AgentStatus`, an immutable snapshot the publisher swaps whole; **never the ring, never the recorder**. The events themselves are handed over ON the session loop's task by `SessionEventPublisher` (`ISessionObserver`, called after the recorder's own work each tick) — the loop enqueues a frame and returns |
@@ -372,7 +373,7 @@ the pipe's tasks touches the ring or the recorder, and the session loop never wa
## Telemetry poller
1 Hz (the session's `telemetry.interval_ms`, 500–2000 ms) on its own thread: `CompositeTelemetrySource.TryRead` (`18_GPU_VENDOR_APIS` — DXGI/PDH baseline, LibreHardwareMonitor sensors, NVAPI extras on NVIDIA) ~~+ optional CPU sample when the Agent is elevated and PawnIO is present~~ + *(corrected 2026-10-04)* the machine's reading on the same tick — CPU load and memory in use without elevation, CPU temperature only when elevated with PawnIO — and the game process's memory (beta.12, D43). Never called from the game process, never faster than 500 ms. Samples carry the session QPC epoch for timeline alignment.
1 Hz (the session's `telemetry.interval_ms`, 500–2000 ms) on its own thread: `CompositeTelemetrySource.TryRead` (`18_GPU_VENDOR_APIS` — DXGI/PDH baseline, LibreHardwareMonitor sensors, NVAPI extras on NVIDIA) ~~+ optional CPU sample when the Agent is elevated and PawnIO is present~~ + *(corrected 2026-10-04)* the machine's reading on the same tick — CPU load and memory in use without elevation, CPU temperature only when elevated with PawnIO — and the game process's memory (beta.12, D43). **Since 0.1.0-beta.50 (D155, D156) also what the session was played with**: when the option `capture.input_devices` is on and its terms are accepted, the poller opens a view of the Agent's input reader at its start, tells it which processes are the session's game (`Follow`), and attaches to each sample what that view saw since the tick before — `TelemetrySample.Input` (`21_INPUT_DEVICES` §The reader). A tick only the input view answered is still a sample. Never called from the game process, never faster than 500 ms. Samples carry the session QPC epoch for timeline alignment.
## Session recorder — state machine
+42
View File
@@ -471,6 +471,48 @@ names no census lists; which feature each serves is not established.)* The sessi
difference ("the game ships 3.7.10.0: another copy was loaded"); since beta.24 the DLSS line says where each DLSS
library was loaded from (the game, the graphics driver, Windows) — by folder, never who put it there.
## Does a game support controllers — three pieces of evidence, no verdict (0.1.0-beta.50, owner decision D163)
**The owner's request, 2026-11-14:** "check whether the game supports controllers, shown in its details." From
outside a game FrameLedger can know that a controller was in use while the game was in front — not what the game
did with it — and a store's listing is the store's word. So the game's page shows three rows, each with where it
comes from, and FrameLedger adds no Yes or No of its own (`App.Services.ControllerEvidence`):
| Row | What it says | From | When it is N/A |
|---|---|---|---|
| **Controller support (store)** | *Full — as Steam lists it*, *Partial — as Steam lists it*, *Steam lists none* | `games.controller_support` (schema 0024), read from the Steam app's own file on this PC | a game no store file on this PC describes: not a Steam game, or Steam has no record of it here |
| **Input libraries loaded** | each interface with the files seen — `XInput (xinput1_4.dll)`, `SDL (SDL2.dll)` — or *None seen* | the module snapshot of the newest session measured from inside (`sessions.runtime_modules`) | a game never measured from inside: an unhooked session takes no snapshot (`04_CAPTURE`) |
| **Usually played with** | the share of the time in front with a controller, the keyboard and mouse, both, neither, over the sessions that recorded it | `sessions.input_*` (`03_METRICS` §Input) | no session has recorded it |
### What a store lists
**Steam's `appcache\appinfo.vdf`, on the disk** (`Infrastructure.Import.SteamAppInfo`). The Steam client keeps a copy
of the store's application records there; a record's `common` section may hold `controller_support` = `full` or
`partial`, and a record without it lists none. **No request is made to any store** (CLAUDE.md rule 8 — the
setting `privacy.online_metadata` is still read by nothing). Only format 41 is read (magic `0x07564429`, keys as
numbers into a table of strings at the end of the file); another magic is refused with the reason and the row reads
N/A. The layout was checked on the developer's Steam folder on 2026-11-14: 3 581 records, every tree read to its
last byte, 1 284 *full*, 440 *partial*, 1 857 with no such key. No length in the file is trusted — a record or a
string that claims more than the file holds is a problem, and a file that cannot be read whole says nothing.
**Read when a game's page opens** (`App.Services.StoreControllerSupport`, from `GameLibrary.LoadAsync`): the game's
Steam record is found as Play and the artwork find it (`StoreRecords.Owning`), the file is read for that one
application, and the row is written only when the answer differs — `IGameRepository.SetControllerSupportAsync`,
the UI's write, which moves no `updated_at`. **A viewer reads nothing of this PC** (D52) and shows what the copy's
rows hold. GOG, Epic, itch and the Xbox app keep no such fact on the disk that this build knows of: their games read
N/A.
### Input libraries
`Domain.Input.InputLibraries`: `xinput1_4.dll`, `xinput1_3.dll`, `xinput9_1_0.dll`, `xinputuap.dll` (XInput);
`dinput8.dll`, `dinput.dll` (DirectInput); `windows.gaming.input.dll`; `gameinput.dll`; `sdl2.dll`, `sdl3.dll`
(SDL). The Agent's module snapshot looks for them beside the upscaling and frame-generation libraries
(`AgentServices`), so they are in `sessions.runtime_modules` — hooked sessions only, as that snapshot always was.
The session summary's *Libraries* line leaves them out; they are the game page's.
**Loaded is not used.** Several engines load XInput whether the game reads a controller or not, and Steam's own
overlay can bring an input library into a game. That is why this is one of three rows and not an answer.
## DLSS generation — evidence-bound (beta.24, owner decision D64)
**What a session can say about which DLSS ran, and nothing more.** `Domain.Detection.DlssGeneration` names a
+4 -2
View File
@@ -2,7 +2,7 @@
`%LOCALAPPDATA%\FrameLedger\ledger.db`. Pragmas: `journal_mode=WAL`, `synchronous=NORMAL`, `foreign_keys=ON`, `busy_timeout=5000`. `Microsoft.Data.Sqlite` + Dapper; all writes in explicit transactions.
**Writer ownership:** Agent writes `sessions`, `session_segments`, `frame_blobs`, `sensor_blobs`, `hardware_snapshots`, *(since schema 0023, 2026-11-11)* `machine_profiles` and `session_advanced`, the hook-state columns on `games`, **and since P4 PR-1 (2026-09-14) the *detected* columns on `games`** — `engine`, `engine_version`, `platform` under the per-field provenance rule (`05_DETECTION` §Caching: a `user` field is never touched), `capability_flags` whole, and the cache key `detection_rules_version` / `detection_exe_size_bytes` / `detection_exe_mtime_ms`, and since schema 0011 (2026-09-25) the executable's own facts `exe_machine` / `exe_file_version` / `exe_product_version` / `library_versions`, written whole like the flags — through `IGameRepository.ApplyDetectionAsync` only. The UI and the Agent were both already writers of `games`; this adds columns to the Agent's half, not a third writer (HANDOFF §P4). **And since P4 PR-4 the UI's library import writes `platform`, `store_id` and `game_version` through `ApplyStoreMetadataAsync`** — the same per-field provenance rule, badged `detected` (a store's record is not the user's typing), on columns the UI already owned. **And since 2026-09-23 the Agent's relocator merges two entries for one executable under two drive letters** (`IGameMerge`, HANDOFF D26, `19_SAFETY` §A moved drive is the same executable): in one transaction it re-parents the dropped entry's `sessions` to the survivor (before the delete — `sessions.game_id` cascades), carries a block or a crash auto-disable still in force to the survivor (`hook_enabled` only ever to 0; `hook_blocked_reason` is copied, never originated or cleared), adds the crash counts, deletes the dropped `games` row, and then moves the survivor to the file's path (after the delete — `exe_path` is UNIQUE). It was the one Agent write that deletes a `games` row until beta.19; it never touches a consent column. **And since beta.19 (2026-10-12, D55) the Agent removes an entry whose game is no longer installed** (`IGamePrune`, `SqliteGamePrune`, asked by the detection sweep through `UninstalledEntryPrune`): one `DELETE` that holds every stored condition in the same statement — the same row at the same path, `removed_at` NULL, no session stored (`NOT EXISTS` on `sessions` — nothing cascades), no `hook_blocked_reason`, `hook_prescan_state` not `blocked`, no `ac_exception_at` and no `ac_exception_trial_failed_at` — behind `retention.remove_uninstalled_games`; a block, a grant and D38's mark are never removed with their entry (`19_SAFETY` §What a finding does to the game, *What clears it*). **And since 2026-09-23 the UI writes `record_sessions`** (schema 0009, FR-1.6): the entry's recording switch, which the Agent only reads — off, the watcher does not watch for the program. The script's one data change switches it off for entries an old import made for Steam's own tools (`SteamLibrarySource.KnownTools`, the ids as of the script); a twin merge keeps it off when either twin had it off. **And since 2026-09-25 the Agent's pre-scan of the library (`19_SAFETY` §What a finding does to the game) writes the hook-state columns of every entry, not only of those the user asked to hook** — `hook_prescan_state`, and on a finding `hook_enabled = 0` and `hook_blocked_reason` — and its own key, `hook_prescan_rules_version` / `hook_prescan_exe_size_bytes` / `hook_prescan_exe_mtime_ms` (schema 0010), through `IGameConsentStore.RecordPreScanAsync` only: columns that were already the Agent's, never over a block, never a new row. **And since 2026-09-26 (schema 0014, D33) the Agent writes the user-mode exception's columns** — `ac_exception_*` on `games` through `IGameConsentStore` only (eligibility from the sweep, a grant from the `SetAntiCheatException` command, every end), and `sessions.ac_exception_family` with the session — the grant only after the user accepted its disclosure in the UI, which asks and never writes. **And since 2026-10-03 (beta.11, D40) the Agent deletes sessions on request** — every session of one game or of every game, `DeleteSessions` over the pipe, through `ISessionRepository.DeleteSessionsAsync` in one transaction (segments, blobs and annotations cascade), never while one is being recorded; the UI asks and never deletes a session row itself *(for Delete all sessions; FR-1.4's removal is the App's own cascade, above — corrected 2026-10-04)*. **Maintenance (P4 PR-7) adds no writer:** the retention sweep on demand is the Agent's, asked over the pipe; the UI's `VACUUM` rewrites pages with the same contents and changes no row (§Retention built note). UI writes `games` (user-editable fields — since P3 PR-3 that is the FR-1.3 metadata, the `*_default` tri-states, and `removed_at`; ~~never a `hook_*` column~~ **and two downgrades** *(corrected 2026-10-04)*: *Change executable* (2026-09-21, `GameLibrary.ChangeExecutableAsync`) turns hooking off, clears the consent and pre-scan columns and ends an excepLine truncated
**Writer ownership:** Agent writes `sessions`, `session_segments`, `frame_blobs`, `sensor_blobs`, `hardware_snapshots`, *(since schema 0023, 2026-11-11)* `machine_profiles` and `session_advanced`, the hook-state columns on `games`, **and since P4 PR-1 (2026-09-14) the *detected* columns on `games`** — `engine`, `engine_version`, `platform` under the per-field provenance rule (`05_DETECTION` §Caching: a `user` field is never touched), `capability_flags` whole, and the cache key `detection_rules_version` / `detection_exe_size_bytes` / `detection_exe_mtime_ms`, and since schema 0011 (2026-09-25) the executable's own facts `exe_machine` / `exe_file_version` / `exe_product_version` / `library_versions`, written whole like the flags — through `IGameRepository.ApplyDetectionAsync` only. The UI and the Agent were both already writers of `games`; this adds columns to the Agent's half, not a third writer (HANDOFF §P4). **And since 0.1.0-beta.50 (schema 0024, D163) the UI writes `controller_support`, `controller_support_source` and `controller_support_at`** — what the Steam app's own file on this PC lists, read when a game's page opens and written through `IGameRepository.SetControllerSupportAsync` only when it differs; no `updated_at` moves and no other column is touched. **And since P4 PR-4 the UI's library import writes `platform`, `store_id` and `game_version` through `ApplyStoreMetadataAsync`** — the same per-field provenance rule, badged `detected` (a store's record is not the user's typing), on columns the UI already owned. **And since 2026-09-23 the Agent's relocator merges two entries for one executable under two drive letters** (`IGameMerge`, HANDOFF D26, `19_SAFETY` §A moved drive is the same executable): in one transaction it re-parents the dropped entry's `sessions` to the survivor (before the delete — `sessions.game_id` cascades), carries a block or a crash auto-disable still in force to the survivor (`hook_enabled` only ever to 0; `hook_blocked_reason` is copied, never originated or cleared), adds the crash counts, deletes the dropped `games` row, and then moves the survivor to the file's path (after the delete — `exe_path` is UNIQUE). It was the one Agent write that deletes a `games` row until beta.19; it never touches a consent column. **And since beta.19 (2026-10-12, D55) the Agent removes an entry whose game is no longer installed** (`IGamePrune`, `SqliteGamePrune`, asked by the detection sweep through `UninstalledEntryPrune`): one `DELETE` that holds every stored condition in the same statement — the same row at the same path, `removed_at` NULL, no session stored (`NOT EXISTS` on `sessions` — nothing cascades), no `hook_blocked_reason`, `hook_prescan_state` not `blocked`, no `ac_exception_at` and no `ac_exception_trial_failed_at` — behind `retention.remove_uninstalled_games`; a block, a grant and D38's mark are never removed with their entry (`19_SAFETY` §What a finding does to the game, *What clears it*). **And since 2026-09-23 the UI writes `record_sessions`** (schema 0009, FR-1.6): the entry's recording switch, which the Agent only reads — off, the watcher does not watch for the program. The script's one data change switches it off for entries an old import made for Steam's own tools (`SteamLibrarySource.KnownTools`, the ids as of the script); a twin merge keeps it off when either twin had it off. **And since 2026-09-25 the Agent's pre-scan of the library (`19_SAFETY` §What a finding does to the game) writes the hook-state columns of every entry, not only of those the user asked to hook** — `hook_prescan_state`, and on a finding `hook_enabled = 0` and `hook_blocked_reason` — and its own key, `hook_prescan_rules_version` / `hook_prescan_exe_size_bytes` / `hook_prescan_exe_mtime_ms` (schema 0010), through `IGameConsentStore.RecordPreScanAsync` only: columns that were already the Agent's, never over a block, never a new row. **And since 2026-09-26 (schema 0014, D33) the Agent writes the user-mode exception's columns** — `ac_exception_*` on `games` through `IGameConsentStore` only (eligibility from the sweep, a grant from the `SetAntiCheatException` command, every end), and `sessions.ac_exception_family` with the session — the grant only after the user accepted its disclosure in the UI, which asks and never writes. **And since 2026-10-03 (beta.11, D40) the Agent deletes sessions on request** — every session of one game or of every game, `DeleteSessions` over the pipe, through `ISessionRepository.DeleteSessionsAsync` in one transaction (segments, blobs and annotations cascade), never while one is being recorded; the UI asks and never deletes a session row itself *(for Delete all sessions; FR-1.4's removal is the App's own cascade, above — corrected 2026-10-04)*. **Maintenance (P4 PR-7) adds no writer:** the retention sweep on demand is the Agent's, asked over the pipe; the UI's `VACUUM` rewrites pages with the same contents and changes no row (§Retention built nLine truncated
## Schema (v2 — hook architecture)
@@ -491,6 +491,8 @@ switch's rule); integers are invariant-culture within an inclusive range; choice
| `capture.run_elevated` | bool | `0` | | The App when it starts the Agent, and an Agent the logon task started — both BEFORE the Agent exists, through `Infrastructure.Startup.RunElevatedSetting` (one row, `PRAGMA query_only`, no version gate, anything but `1` is off) (D34, beta.10): on, Windows is asked for administrator rights at every Agent start (`01_ARCHITECTURE` ADR-9) |
| `capture.min_session_s` | int | `30` | 5–600 | Agent, per session (FR-3.6) |
| `telemetry.interval_ms` | int | `1000` | 500–2000 | Agent, per session (FR-3.5) |
| `capture.input_devices` | bool | `1` | | Agent, per session (FR-16, owner decisions D155 and D156, 2026-11-14): **Controllers and input**. On — and only once the Privacy Policy that describes the reading (2.22 or later) is in `legal_acceptance` (`Application.Input.InputTerms`) — a session has a view of the Agent's input reader and stores what it was played with (schema 0024); off, or before that acceptance, nothing of it is read or stored, and a session held back by the terms says so in its notes. Any row that is not exactly `0` is on. Settings ▸ Recording (`21_INPUT_DEVICES`) |
| `capture.input_devices` | bool | `1` | | Agent, per session (FR-16, owner decisions D155 and D156, 2026-11-14): **Controllers and input**. On — and only once the Privacy Policy that describes the reading (2.22 or later) is in `legal_acceptance` (`Application.Input.InputTerms`) — a session has a view of the Agent's input reader and stores what it was played with (schema 0024); off, or before that acceptance, nothing of it is read or stored, and a session held back by the terms says so in its notes. Any row that is not exactly `0` is on. Settings ▸ Recording (`21_INPUT_DEVICES`) |
| `telemetry.advanced` | bool | `0` | | Agent, per session (FR-5.6, owner decision D101, 2026-11-11): **Advanced metrics**. On, a session holds the Agent's shared reader and stores its `adv.*` series and its `session_advanced` row (schema 0023); off — and any row that is not exactly `1` — nothing more is read or stored, and a session recorded while off has no row. Settings ▸ Recording (`18_GPU_VENDOR_APIS` §The switch) |
| `retention.raw_sessions_per_game` | int | `20` | 0–10000; **0 = unlimited** | Agent, per session (§Retention) |
| `retention.remove_uninstalled_games` | bool | `1` | | Agent, at every detection sweep (beta.19, D55, FR-1.8): on, an entry whose executable has been gone for ten minutes — its drive connected, the folder it was installed in still there — and that has no session and no anti-cheat block or exception is removed; off, it stays and reads *Not installed* (D41's behaviour) |
@@ -855,7 +857,7 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
> (D156); on a game no store file describes. The series are `sensor_blobs` rows named `input.*` (§Blob encoding).
> `LatestVersion` is 24; `LedgerDatabaseTests.ScriptTwentyFourAddsTheInputColumnsAndAnEarlierSessionAndGameHaveNone`,
> the repository round trip. **Nothing produces a reading yet, and nothing writes the three `games` columns yet**:
> the reader, the switch and the store file are the pull requests after this one.
> the reader, the switch and the store file are the pull requests after this one *(all three are there since the pull requests that followed: `21_INPUT_DEVICES`, `05_DETECTION` §Does a game support controllers)*.
> **A beta.49 cannot open a ledger a later build migrated.**
> **`0022_dlss_nr.sql` (beta.34, 2026-11-06, owner decision D84) — DLSS 5's neural rendering, measured.** One REAL column,
+22 -1
View File
@@ -58,7 +58,7 @@ Compare showed the icon alone)*. Light/Dark/System themes via `ApplicationThemeM
> **Help ▸ User guide, beta.12 (D44).** `guide/` — ~~eight~~ short English pages for players (install, record a game, read
> your results, anti-cheat and safety, your data, questions and answers, the terms in plain words; *since beta.17, D54,
> also the screens, every setting, what to do when something goes wrong and the words the App uses — twelve pages,
> and the wiki's End-user part*) — embedded in the
> and the wiki's End-user part; fourteen since 0.1.0-beta.50, with Advanced metrics (beta.39) and Controllers and input*) — embedded in the
> App (`Services.EmbeddedDocuments.Guide`, titles from each page's first heading) and shown in a `Windows/DocumentWindow`
> with a page list, Limitations last; a link between guide pages opens the page in the window. Help ▸ Documentation is
> *Online documentation*: the README at this build's source. `GuideDocumentsTests` holds every page listed and titled and
@@ -656,6 +656,27 @@ Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutte
> N % of rendered frames)* heads the line where the game was seen running it, its library listed like the others, *runtime
> loaded, not seen running* where the Overlay looked and saw none (D84) — `05_DETECTION` §DLSS generation.)*
> **0.1.0-beta.50 (D155-D163): Played with.** Above the annotations, in either tier, the summary says what the session
> was played with (`Services.InputPresentation`, from the row's stored totals and `sessions.input_devices` - nothing is
> recomputed from the series): a line saying how long it was read and how long the game was in front; a bar
> (`Controls.InputShareBar`, on `ShareBar`, which `FgMixBar` now derives from too) and a table of the four classes -
> a controller, the keyboard and mouse, both at once, no input - each with its share of the time in front and its time;
> the number of changes between a controller and the keyboard and mouse; a **Controllers** table (name, connection, in
> use, connected, connected / dropped, and the battery: the state held longest and for how long, the first and last
> level, the drain); each maker's share where there were two; and one sentence for each thing the reader could not do
> or Windows showed twice. A session with no share says why in one line: the terms were not accepted yet, the game was
> never in front, or nothing was recorded. Two charts follow from the session's `input.*` series
> (`Charts.InputSeries`, gaps kept): **Input over the session** (`InputTimelineChart`: one row a class, a marker a
> second, each row named on the axis and each class with a marker shape of its own) and **Controller battery**
> (`InputBatteryChart`: a step line a controller, XInput's four levels drawn at thirds and labelled as four levels).
> A controller's connections, drops and batteries that fell to low are `InputEvent`s: vertical lines on the timeline
> and, behind the **Controller marks** box, on the frame-time chart of a hooked session whose frames say where they
> sit on the sensors' clock (`SessionSeries.SensorOffsetS`) - each kind a line pattern of its own, sixty marks at most.
> The four classes take palette roles that exist (`ChartPalette.InputFill`: Native, Displayed, Sensor, MixNone), so no
> key was added. Trend has `ControllerShare` and `KeyboardMouseShare` (every tier, never partial); Compare has
> *Played with* and *Controllers*, never ranked; the CSV has `# input:`. `InputPresentationTests`, `InputChartsTests`;
> the summary the sweeps of `PagesLoadTests` draw carries the block. Checked against synthetic sessions only.
> **beta.27: one window per session, and no DLSS line that says only *DLSS*.** Opening a session whose summary window is
> open — from a Sessions tab, a notification, the game page — brings that window forward, restored if minimised, rather
> than opening a second (`SessionSummaryOpener`; the owner had two windows of one Silent Hill 2 session, 2026-10-20). The
+2 -1
View File
@@ -334,7 +334,8 @@ CI/CD with the native build (`release.yml` exists since P4 PR-5, 2026-09-14 —
## After the controller train — the owner's order (2026-11-14)
Advanced metrics is closed (D154) and the controller feature is being built as 0.1.0-beta.50's train. Asked what
Advanced metrics is closed (D154) and the controller feature ~~is being built as 0.1.0-beta.50's train~~ **was
released as 0.1.0-beta.50 (2026-11-15), unproven on a real controller until owner-only item 48**. Asked what
comes after, the owner was shown six directions and chose four of them, and added distribution. **This is the
order of work after the controller train; each begins with a plan of its own and the owner's approval.** Nothing
here is designed yet, and what is marked *to verify* is a lead, not a finding.
+20
View File
@@ -1265,6 +1265,26 @@ outlives a rules change, a game update and *Change executable*; §What a finding
> the user. Cautious mode returns with the overlay, when there is something
> for it to switch off.
## What the Agent reads about input, from outside every game (owner decisions D155–D159)
Since 0.1.0-beta.50 the Agent can say what a session was played with (`21_INPUT_DEVICES`). It is on this page
because of what it must never become:
- **It is read from Windows, by the Agent. Nothing is added to a game**: no hook, no injected code, nothing in
`17_HOOK_ENGINE` §Hook inventory. Rule 4 is untouched, and a game the guard refuses is read like any other —
nothing about it touches the game's process.
- **No hook of any kind.** `SetWindowsHookEx` stays forbidden everywhere (`tools/chokepoint-check.ps1`); keyboard
and mouse are known by one call that returns a time (`GetLastInputInfo`), and raw input is registered for
joysticks and gamepads only — never for a keyboard or a mouse. A tool that hooks or registers for the keyboard is
what security software, and some anti-cheat, look for; this is not one.
- **No device is opened and nothing is sent to one.** A handle of FrameLedger's on a controller could make a game's
own exclusive open fail; an output or feature report could change how a controller reports to the game. Neither
is done.
- **A committed list holds it**: `tools/input-readonly-check.ps1` (`12_BUILD` step 14g).
Whether any anti-cheat objects to a background program that receives controllers' reports is not known; none is
documented to. It reads nothing of, and does nothing to, the game.
## Honest limits to document to users
The Disclaimer states these explicitly, and the UI consent dialog echoes them:
+1
View File
@@ -1874,6 +1874,7 @@ Moved verbatim, in this order.
| M13 ❓ | **Advanced metrics — LibreHardwareMonitor's CPU, memory, motherboard and storage groups, elevated, with PawnIO (D103, 2026-11-11).** Never opened by any build: §M10's elevated run has not been taken either, and this is a larger surface — a sensor chip on the LPC bus, the embedded controller, SPD over SMBus, SMART. Unknown: whether each group opens on the owner's board, what a refresh costs, whether opening the storage group touches removable drives (this PC once had a failing USB drive), and whether any group enables a privilege (`PrivilegeFootprintTests`). | **One elevated run with the probe verb, before the option exists.** Pre-committed: the storage group cannot be opened without touching removable drives → `lhm.storage.*` stays N/A in beta.39 and its reach reads `Deferred`; a node that throws twice → skipped for the session; the Agent above 1% of one core or 150 MB with the option on (NFR-2) → the slow groups are read less often or dropped before the release; a privilege enabled by a group → that group is not opened, and the owner is asked. **Two of the four answered 2026-11-11, before the option exists.** (1) **Storage: not opened, by the first outcome.** LibreHardwareMonitor 0.9.6's `StorageGroup` lists every drive through DiskInfoToolkit's `ReloadStorages` with no filter by bus and follows drives plugged in later — it cannot be opened without touching removable drives. `lhm.storage.*` reads `Deferred`, and `LhmGroups` has no member for it. (2) **Cost, unelevated, measured with `probe-advanced`** on the dev box: one refresh of the graphics-card group alone is 14 ms of processor time (62 ms elapsed) — 1.4% of one core at one a second, above NFR-2 — and one NVAPI read 0.4 ms. By the third outcome the sensor library is read every fifth tick (0.28%). **Still open, and the owner's**: the same probe as administrator with PawnIO — whether the processor, memory and motherboard groups open on this board, what they cost, and `PrivilegeFootprintTests`' new case on a token that holds the privileges (CI's does; the dev box's unelevated run passes by construction). **The first run was taken on 2026-11-12, by the owner, in ordinary use** (0.1.0-beta.40, the Agent as administrator with PawnIO, an i7-14700KF on a board with an IT8689E chip, an RTX 5080), and read here from a copy of the ledger and the Agent's log, not from a probe. **The groups open and read**: nine of ten sessions stored 119 processor series (a clock and a load per thread, temperatures, powers, voltages), 14 memory series and 21 motherboard series (six fans, six temperatures, nine voltages) beside the card's 41 — 195 from the sensor library in all. **No value was compared with another tool**; that is still the owner's. **Two faults, one cause** (`Infrastructure.Telemetry.LhmLibrary`): the Agent held up to three `Computer`s at once, and the library keeps the driver it reads the processor through and its bus mutexes per process — closing one `Computer` let go of them under the others. After seven sessions the Advanced reader's processor device threw `NullReferenceException` twice and was left alone (the page lost the processor until the reader reopened); once a session's start met another instance's close, the reader's `Open` threw `ObjectDisposedException`, and that session stored 17 series instead of 212. **Fixed 2026-11-12**: opens and closes are serialised and a `Computer` is parked, not closed, while another is in use. The cause is read from the log's timing and was not reproduced — it needs this elevation — so **whether the faults are gone is the owner's next sessions to show**: no `advanced: a device is left alone` and no `did not open` in the Agent's log. **First evidence, 2026-11-12, 0.1.0-beta.41, the same PC:** seven sessions between 06:38 and 07:01 with no `advanced:` line at all, each with the option on storing 212 or 213 series; on beta.40 that morning the processor device faulted out after each of six sessions (04:34–05:07) — thirteen of sixteen over the night. The reader failing to open was seen once in sixteen, so this is not yet enough to call that one gone. Still open: any value beside another tool. |
| M16 ✅ | **The L2 telemetry layer's cost — the first number, and it is above NFR-2 (found 2026-11-11, measuring something else).** `LhmTelemetrySource` refreshes LibreHardwareMonitor's graphics-card group once a second in every recorded session. `probe-advanced` measured that refresh, through the same library and the same group, at **14 ms of processor time** on the dev box (RTX 5080, 41 mapped sensors, about twenty of them the Direct3D engine nodes the library enumerates per card) — 1.4% of one core, where NFR-2 allows the whole Agent 1% during capture and `14_TESTING` §Hook overhead's Agent figure has never been measured. This is a measurement of the call, not yet of a session: L2's own poller was not instrumented. | **Measure L2 in a session** (the Agent's processor time over a ten-minute capture, telemetry at 1000 ms and at 2000 ms). Pre-committed: at or under 1% → this row closes with the number; above → the owner chooses between a slower default for `telemetry.interval_ms`, reading the sensors the layer keeps from NVAPI on NVIDIA cards (L3 already has most, at 0.4 ms), or amending NFR-2 to what is measured. Not decided here, and nothing about L2 changes in the Advanced-metrics train. **Measured in a real Agent, 2026-11-11 (owner decision D110), and answered (D117).** `tools/agent-cost.ps1` runs the shipped `FrameLedger.Agent.exe --console capture` against a copy of hook-harness in a scratch data folder — a session that is not hooked, so the telemetry poller runs as in every session and nothing drains frames — and reads the Agent process's own processor time at exit; the cost per second is the slope between a 45 s and a 165 s session, two runs of each. Dev box (RTX 5080, not elevated, layers `l1+lhm+nvapi`): **19.3 ms of processor time per second of session = 1.93 % of one core with Advanced metrics off** (2,312 and 2,312 ms over 45 s; 4,594 and 4,656 ms over 165 s), **20.4 ms = 2.04 % with it on** (2,984 and 3,000; 5,547 and 5,344); peak working set 113 MiB and 119 MiB. A first pass with 30 s and 90 s sessions gave 1.56 % and 2.21 % — its two short runs differed by 670 ms, which is why the lengths were raised. So the probe's number holds in a session: the Agent's steady cost is about twice NFR-2's 1 %, nearly all of it the layer every session has always used, and the new option adds about a tenth of a percent. **The owner's answer: NFR-2 is amended to ≤ 2.5 % of one core** — the limit had never been measured, the sensors keep their one reading a second, and nothing in the code changes. Not measured: a hooked session (the drain's cost on top), a session with the Agent elevated and PawnIO's groups open, another PC. |
| M14 ❓ | **Reflex latency per frame — is there a route within rules 4 and 5? (Train C, 2026-11-11.)** `17_HOOK_ENGINE` §Memory / latency names hooks on `NvAPI_D3D_SetSleepMode` / `SetLatencyMarker` and a call to `NvAPI_D3D_GetLatency`. NVAPI resolves all three through `nvapi_QueryInterface` by id — they are not exports, so a hook on them is a patch at an address learned at run time, the class refused on 2026-08-09. The route to try first needs no hook: the Overlay's own background thread **calls** `GetLatency` with the device of the swap chain it already hooks, once a second (the call returns the last 64 frames' reports). Unknown: whether calling into the driver from that thread is safe on every device kind, what it costs, what it returns when the game never enabled Reflex, and what it means for the Disclaimer's sentence about that thread. | **A spike on `hook-harness` and a stub first, then one real title.** Pre-committed: no route without a patch at a run-time address or a loader-lock call on the game's thread → Reflex stays N/A and the page says why; overhead above NFR-1 → the same. The owner says go or no on the spike's result. **2026-11-12 — the reading that comes before that spike is `spike-notes` §30** (owner decision D130: a document first, beside 0.1.0-beta.45; nothing was run). It finds: a hook on NVAPI's latency functions is the refused class, and a hook on Streamline's Reflex and PCL functions is train D's wrapper (§M15) — and would miss a game that fetched them before the attach, as `slInit` is missed (D129); the Overlay calling `slReflexGetState` itself breaks the thread contract the vendor's header states; **what remains is the route named in this row**, the Overlay calling two driver getters with the game's device, and a no-injection ETW route that gives the game-side markers only and makes the game post messages to its own window. Corrected there: `nvapi64.dll` exports **two** functions on the dev box (`nvapi_Direct_GetMethod` beside `nvapi_QueryInterface`), not one. The go or no is the owner's, and a go needs the owner's ruling that calling a driver getter with the game's device is inside rule 4. **2026-11-13 — the owner answered (D132, D133).** Route D goes to the spike this row names, on `hook-harness` and a stub `nvapi64.dll`, with the ruling: a driver's read-only getter called with the device of the swap chain the Overlay hooks is inside rule 4 (`CLAUDE.md`, the rule's note of that day). No real game before the owner has seen the result, and nothing shipped changes for the spike (`spike-notes` §31, written after 0.1.0-beta.46). Route C is **refused**; the ETW route **stays closed**, and §G is not reopened. **2026-11-13 — the harness spike is done (`spike-notes` §31), and none of its stop conditions fired.** With a stand-in module: nothing is called or loaded when `nvapi64.dll` is absent, a missing getter is refused whole, an error and a report of nothing read as what they are, and a call the driver holds for seconds stops only the thread that made it — so not the watchdog. With the installed driver (32.0.16.2114, RTX 5080), in the probe's own process and with the probe setting the markers a game would: no fault before `NvAPI_Initialize`, without markers, or across 38 million reads beside a marker-setting thread; a call costs half a microsecond to a microsecond and a half; the report is readable from markers alone, in microseconds; and the Direct3D 12 **device** — the object the Overlay already holds — is what the driver takes. What only a game can say is unanswered: a game's own device, a real report, another driver. **The owner's next word is go or no for one real title**; a go is a plan of its own first. **2026-11-13, the same evening — go (D136)**: a plan for one title, Cyberpunk 2077; no code before the plan is approved, and no release carrying it before a stop while a game runs has been exercised on 0.1.0-beta.46 (owner-only item 44 (d)). **2026-11-13, the plan and four more answers (D138–D141).** The read has **no switch of its own**: it is part of Advanced metrics, so after the release it reaches every Direct3D 12 game that loaded the driver's `nvapi64.dll`, for everyone who switched Advanced metrics on — "one title" is the order of the owner's first runs, not a limit in code (D138). The probe ran a leg with a sleep mode first (D139; `spike-notes` §31, *The leg with a sleep*): **the getters do not wait behind `NvAPI_D3D_Sleep`** — thirty-one million reads beside a thread that slept 97 % of the time, none of a millisecond; a read after a sleeping frame costs about 2.6 µs. An `nvapi64.dll` loaded from the game's own folder is refused with the reason (D140). One call of 2 ms or more switches the read off until the game exits (D141). The plan's design, as reviewed against the source, is in [`handoff/history/0.1.0-beta.46.md`](handoff/history/0.1.0-beta.46.md) §The train after 0.1.0-beta.46. **2026-11-13, night — written; released as 0.1.0Line truncated
| M17 | **What the input reader does on a real PC with a real controller — unmeasured (2026-11-14, owner decision D157: built without a probe).** Written and tested against a Windows whose answers the tests write, and run on the developer's PC with no controller connected. Open, each read from the counts a session stores (`InputHealth`) and the Agent's log: (a) **whether XInput answers a program with no window in front** — Microsoft's `XInputEnable` page says the system switches controller input by focus; the reader counts the slices in which a device's own reports changed and XInput said nothing, and falls back to the reports after ten; (b) whether raw input delivers, in the background, the reports of an Xbox pad on USB, on the wireless adapter and on Bluetooth, and of a DualSense on USB and on Bluetooth; (c) whether XInput returns a battery for an Xbox pad on Bluetooth (reported not to); (d) whether a DualSense's reports are laid out as `Domain.Input.DualSenseReport` reads them, and whether its battery is there on Bluetooth with Steam running; (e) whether a controller's own input moves `GetLastInputInfo`'s time (if it does, a controller reads as *both*); (f) **the reader's cost with a controller that sends several hundred reports a second**, against NFR-2's 2.5 % of one core, of which about 2 % is already used — `tools/agent-cost.ps1` measures it with no controller only. **Measured 2026-11-14, the real Agent, no controller connected**: in four sessions of 30 and 90 s the reader took 277 and 834 slices, Windows accepted the registration, XInput's library and the time of the last input were there, and the reader's thread used 15–62 ms of processor time — under 0.2 % of one core in the worst of them. The whole Agent, per second of session: 2.06 % of one core with nothing optional, 1.54 % with input read, 1.61 % with Advanced metrics — three numbers inside the tool's own run-to-run variation (the two 90 s medians with and without input differ by 48 ms), so **the reader's cost is not distinguishable from nothing with no controller connected, and unmeasured with one**; (g) an unelevated Agent beside a game that runs as administrator. Owner-only item 48 (`HANDOFF`) |
| M15 🅓 | **Decided 2026-11-14 (D154): not built. The owner closed Advanced metrics with the refusal standing; the ten entries are listed as not read, with the reason.** ~~**The Streamline state behind `slGetFeatureFunction` — re-examined, not reopened (Train D, 2026-11-11).**~~ The owner asked for the refusal in `handoff/history/p0-queue-1-6.md` to be looked at again. `18_GPU_VENDOR_APIS` §The trains states the route to try (hook the export, hand back a wrapper for a fixed list of names) and what it raises: the wrapper is a write to what the game receives, which rule 4 forbids as written; a wrapper must outlive the Overlay's unhook; a game that fetched its functions before the hook existed is never seen. | **A written design against each of the five grounds, then a spike.** Pre-committed: any ground unanswered → the route stays refused, and `sl.dlssg.*`, `sl.reflex.*` and the rest of that block read N/A with "refused" as the reason. Proceeding needs the owner's amendment of rule 4, asked with the rule quoted. |
| M10 ✅ | ~~PDH `\GPU Engine(*)\Utilization Percentage` summed across engines does not reproduce the Task Manager figure the doc invokes. Decide what we actually report and label it accordingly~~ **Decided 2026-09-09 (PR-E1): L1 does not read the engine counters at all.** `LoadPct` is L2's vendor-reported `GPU Core` load (measured ✓ on NVIDIA, §M5 row R1) and is labelled *GPU load (vendor)* wherever it is shown; on a machine without L2 the field is N/A, never a sum that is not the number the user expects. What L1 does read from PDH is one counter, `\GPU Adapter Memory(luid_…_phys_0)\Dedicated Usage`, bound by LUID — the figure Task Manager labels "Dedicated GPU memory", measured 1301 MB at an idle desktop on the RTX 5080. Reopening this needs a measurement of `max(engine)` against Task Manager's own number, not a decision |
+48 -5
View File
@@ -4,12 +4,14 @@ What FrameLedger reads about game controllers and about the keyboard and mouse,
The numbers a session makes of it are in [`03_METRICS.md`](03_METRICS.md) §Input; the columns are in
[`06_DATA_MODEL.md`](06_DATA_MODEL.md).
> **Status, 2026-11-14 — the reader exists and the Agent does not start it yet.** The model and the arithmetic
> **Status, 2026-11-14 — the Agent records it; the App does not show it yet.** A session recorded with the option
> on, after the terms were accepted, stores what it was played with: the model and the arithmetic
> (`FrameLedger.Domain.Input`, `FrameLedger.Application.Input`, `Application.Recording.InputSessionBuilder`), the
> storage (schema 0024, the `.partial` file's chunk 11, the finalizer for both tiers — `06_DATA_MODEL`) and the reader
> itself (`Application.Input.InputReader`, `Infrastructure.Input`) are written and under test. Nothing composes the
> reader into the Agent: the switch, the terms and the screens come in the pull requests after this one, and this
> note is rewritten by each. **No report from a real controller has passed through any of this code**
> storage (schema 0024, the `.partial` file's chunk 11 — `06_DATA_MODEL`), the reader (`Application.Input.InputReader`,
> `Infrastructure.Input`) and its composition into the Agent (`capture.input_devices`, `Application.Input.InputTerms`)
> are written and under test; and a game's page shows the three pieces of evidence for "supports controllers"
> (`05_DETECTION` §Does a game support controllers). The session's own screens come in the next pull request, and
> this note is rewritten by it. **No report from a real controller has passed through any of this code**
> (owner decision D157): the developer has no controller, and what happens on a real one is owner-only item 48.
## The owner's request and decisions (2026-11-14)
@@ -31,6 +33,17 @@ DualSense first.
| **D162** | Also built: the number of switches between a controller and the keyboard and mouse, and the share of time with no input; marks on the frame-time chart where a controller connected, dropped or ran low; a battery's first and last level and its rate; the kind of connection; a note where Steam Input presented the controller as an Xbox pad; a trend metric, a row in Compare, and "usually played with" on the game's page. |
| **D163** | "Supports controllers" is **three pieces of evidence, never a verdict**: what Steam's own file on the disk says (no network: rule 8), which input libraries the game loaded, and how the game was actually played. From outside a game one can know that a controller was in use while the game was in front — not what the game did with it. |
## The switch, and the terms
`capture.input_devices` — Settings ▸ Recording ▸ *Controllers and input* — is **on unless switched off** (D156), and
is read at each session's start like every setting the Agent reads. On is not enough: the Agent is usually started
at logon, and after an update that is before the App has shown the Privacy Policy that describes this reading. So
`SettingsRecorderPolicy` gives a session the reader only when `legal_acceptance` holds the Privacy Policy at
`InputTerms.MinimumPrivacyVersion` (2.22) or later. Until then the session reads nothing of controllers or of the
keyboard and mouse, stores none of schema 0024's columns, and says so: the slot `input=terms_pending` in
`sessions.capture_notes` (`CaptureNotes.InputHeldForTerms`), and a line in its `.partial` file's notes. An operator's console with no acceptance store reads
nothing either. Off, or held back, a session is byte for byte what it was before the reading existed.
## What is read, and from where
Everything is a Windows API in a library Windows ships. **No third-party library is added.**
@@ -43,6 +56,13 @@ Everything is a Windows API in a library Windows ships. **No third-party library
| `GetForegroundWindow`, `GetWindowThreadProcessId` | whose window is in front | already used for the focus sample (`04_CAPTURE`) |
| Steam's `appcache\appinfo.vdf`, on the disk | whether the store lists controller support for a library game | a local file: no request is made (rule 8) |
**The time `GetLastInputInfo` gives is compared only with the time it gave before** — "did it change since the last
slice". It is never set against a clock of .NET's. *Measured 2026-11-15, by accident*: on the developer PC, which
had slept for five hours since it started, that time and `Environment.TickCount` stood five hours apart — Windows'
tick counts the time asleep and .NET's does not — and a test that assumed one clock failed (it now asks only that
the time does not go back). Anything built on these times later — the time actually played, `15_ROADMAP` §After the
controller train — must work in differences of this one source, or it breaks on every PC that sleeps.
**Rejected, with the reason** (the checklist of `18_GPU_VENDOR_APIS` §Checklist applies to any library):
- **Windows.Gaming.Input** — its readings stop when the program is not in front, which the Agent never is.
@@ -154,3 +174,26 @@ registration, how many reports came and how many could not be read, whether XInp
states it returned, how often a controller's own reports said *in use* while XInput said nothing, whether the time of
the last input could be read, how many slices were taken and how much processor time the reader's thread used. Counts
and yes-or-no answers; nothing in it names a device.
## In the App
`08_UI` §Session summary has the detail; the short of it (0.1.0-beta.50):
| Where | What | From |
|---|---|---|
| A session's summary, **Played with** | the four classes as a bar and a table, the changes between a controller and the keyboard and mouse, the controllers with their batteries, the makers' shares, what the reader could not do; why a session has none | the row's `input_*` columns and `input_devices` (`Services.InputPresentation`) |
| The same, two charts | what each second was played with; each controller's battery | the `input.*` series (`Charts.InputSeries`) |
| The frame-time chart, **Controller marks** | a connection, a drop, a battery that fell to low, as lines across the frames | the same series, placed by `frame_blobs.first_present_ms`; hooked sessions only |
| A game's page, **Details** | what the store lists, the input libraries loaded, how it was played | `05_DETECTION` §Does a game support controllers |
| **Trend** | Controller share, Keyboard and mouse share | the row, every tier |
| **Compare** | Played with, Controllers | the row, never ranked |
| The CSV export | `# input:` - the milliseconds, the switches, the sources, each controller | `03_METRICS` §Export schema |
| The JSON export, the bug report | the row's columns as they are | Privacy Policy 3A |
A mark is drawn from the series, not from the row: a controller's `input.dev.N.active` goes from no value to a value
where it connected and back where it dropped, and the row's `connects` says whether the first of them was the
session's start. A battery "fell to low" where its level went from above XInput's *low*, or above 10 %, to at or
under it - a falling level is a battery running down, and the state is not in the series.
**Everything in this table has been drawn from synthetic sessions only.** What a real controller's series look like -
how often a Bluetooth pad flaps, whether a DualSense's battery steps as the fixture's does - is owner-only item 48.
+187 -107
View File
@@ -88,6 +88,7 @@ owner-only items stay below; the history of every train, the passed owner-only i
| `§beta.46`, what the owner's five sessions on beta.46 showed (item 44), the design of the train that followed as the plan's review left it (`§The train after 0.1.0-beta.46`), that release's facts, the traps of that train | [`handoff/history/0.1.0-beta.46.md`](handoff/history/0.1.0-beta.46.md) |
| `§beta.47`, what that release decided beyond D136–D141, what item 44's last part showed, that release's facts, the traps of that train, its NEXT as the owner's sessions of 2026-11-14 changed it | [`handoff/history/0.1.0-beta.47.md`](handoff/history/0.1.0-beta.47.md) |
| `§beta.48`, what that release decided beyond D142–D147, that release's facts, the traps of that train, its NEXT and its "Left open" as item 46 changed them | [`handoff/history/0.1.0-beta.48.md`](handoff/history/0.1.0-beta.48.md) |
| `§beta.49`, what that release decided beyond D148–D151, that release's facts, the traps of that train, its NEXT and its "Left open" as item 47 and D152–D154 changed them | [`handoff/history/0.1.0-beta.49.md`](handoff/history/0.1.0-beta.49.md) |
| `§Owner-only`, an open item | [§Owner-only](#owner-only--no-pr-can-close-these) below |
| `§Owner-only`, a passed item (3, 12, 14–19, 38, 39) | [`handoff/owner-only-passed.md`](handoff/owner-only-passed.md) |
| `§Traps`, `§Two corrections carried forward` | [`handoff/traps.md`](handoff/traps.md) |
@@ -95,126 +96,146 @@ owner-only items stay below; the history of every train, the passed owner-only i
---
## **START HERE** — 2026-11-14, 0.1.0-beta.49: item 46 read; the frames counted for the log, Reflex and frame generation together; a read a second on a grid; the Agent keeps the reading that waits
## **START HERE** — 2026-11-15, 0.1.0-beta.50: what a session was played with — controllers and input, read from outside the game, and built without a controller
*Status is `docs/changelog/0.1.0-beta.49.md`; this is what no other file carries.* The owner ran item 46 on
beta.48 the afternoon it was released — ten sessions, then eight more — and said: check (#455, and item 46's last
paragraphs, below). The read works, the samples are a second apart, both games give both of the driver's own
times, the multipliers are listed, off means off, **and the owner's word: no hitch**. Two things were left, the
owner said *do both*, and four answers given while planning made the train (D148–D151): #456 (the Overlay counts
each summed frame for its log), #457 (the watchdog's periodic tick on a grid), #458 (the Agent keeps the reading
that waits; the guide on whose switches the table shows), and this release. **beta.48's own section, its traps
and its release facts are [`handoff/history/0.1.0-beta.48.md`](handoff/history/0.1.0-beta.48.md).**
*Status is `docs/changelog/0.1.0-beta.50.md`; this is what no other file carries.* On 2026-11-14 the owner asked
for nine things about controllers: whether a game supports them, on the game's page; which interfaces and
libraries; the share of a session played with a controller and with the keyboard; connections and drops; the
battery state that lasted longest; all of it stored and charted; changes between makers and each one's share; Xbox
controllers and the DualSense first; and whatever rounds it out. Nine answers given while planning made the
train (D155–D163, `21_INPUT_DEVICES` §The owner's request and decisions): #464 (the arithmetic), #466 (schema
0024 and the `.partial` file's chunk 11), #467 (the reader), #468 (the Agent, the switch, Privacy Policy 2.22
and Disclaimer 2.18, Tier 2's definition), #469 (what a store lists, the input libraries, the game's page),
#470 (the session's summary, the charts, Trend, Compare, the export, the guide's page), and this release — which
also carries D152 and D154 from `[Unreleased]`. **beta.49's own section, its traps, its release facts and its
"Left open" are [`handoff/history/0.1.0-beta.49.md`](handoff/history/0.1.0-beta.49.md).**
### What this release decided, beyond D148–D151
### The one thing to know: nothing here has met a controller
- **The counts are of each frame's own two numbers, with sums, and no threshold.** The draft counted spans of no
length; a sample whose mean span is half a microsecond says spans of one or two microseconds exist, and a count
of exact zeros would have read "the driver's" where it was "ours". So the frames that have both a span and an
active time are kept in two heaps — active longer than the span, or not — each with its count and both sums.
- **A batch's state is three things**: the driver's low-latency switch, its "the game sleeps" switch
(`bUseGameSleep`: NVAPI's "is `NvAPI_D3D_Sleep()` being called") and its frame-generation multiplier. The second
was added on the owner's word — Reflex goes with frame generation in the owner's games, and the low-latency
switch can be the NVIDIA App's override — and Clair Obscur's two sessions read exactly that: `bUseGameSleep`
off throughout without frame generation, on with ×3.
- **Only the driver read and the publication are the periodic tick's.** The request is still followed on every
tick, so the hooks a session asks for go in on the tick the loader woke — a game that has just loaded
Streamline calls it at once. A draft that moved the whole block would have missed those calls.
- **One read is armed at every periodic tick, and the grid is what keeps two apart**: half a second at the least,
after a tick that ran that late. "At most once a second" is no longer said anywhere.
- **A session's first publication may hold a moment's worth.** A request seen on a woken tick is published by the
periodic tick that follows, however soon. One test read a single publication as complete and had to stop.
- **The Agent keeps two sets, and an empty one does not wait.** A reading can stand at the sample after the one it
would have ridden — a second later. With the sensor interval above a second the oldest is still pushed out.
- **No legal text changed (D149)**, although a bug report carries the Overlay's logs and so these lines: the
owner was told and chose it. The Privacy Policy names the logs of the component loaded into games.
- **The plan was reviewed against the source by a second reader before the owner saw it, and sixteen things in
the draft were wrong** — among them the three above, and the whole of the Agent's half, which the draft did not
have.
**The developer has no controller, and the owner chose to build without a probe run first (D157).** So:
- **Checked against a real Windows, with no controller connected**: `Win32InputBackendTests` (the registration is
accepted, the window drains, the reader reports "no controller"); the shipped Agent in a scratch data folder
(`tools/agent-cost.ps1 -Keep`) stored `input_observed_ms` 29 826 of a 30.9 s session, `input_source`
`rawinput+xinput+lastinput`, the `input.class` series and the reader's counters, and stored nothing with the
option off or the terms not accepted; the Agent's cost per second of session was inside the run-to-run noise
(2.06 % of a core without, 1.54 % with — `20_OPEN_QUESTIONS` §M17).
- **Checked against the owner's own file**: the Steam app's `appinfo.vdf` on the developer PC parsed to 3 581
records — 1 284 full, 440 partial, 1 857 with no entry.
- **Checked against bytes and sessions written by hand, and against nothing else**: every DualSense report
layout, XInput's states and battery words, a background program being given a controller's reports at all,
Steam's virtual pad and the fold that makes one controller of two, the battery arithmetic, the marks, every
share the App shows, and the reader's cost with a controller connected.
`LIMITATIONS.md`, the accuracy statement, the guide's page and the release's notes all say so. **Item 48 is where
it meets the owner's Xbox controller and DualSense.**
### What this release decided, beyond D155–D163
- **Only Xbox-compatible controllers (through XInput) and the DualSense (through its own reports) are read for
use.** Any other controller is listed with its connections and is never "in use": the reader parses no other
report, and `LIMITATIONS.md` says so. Adding one is a parser in `Domain/Input` and bytes to test it with.
- **A DualSense's transport decides how its report is read, not the report's length**: Windows pads the short
Bluetooth report to the device's longest, so `DualSenseReport.TryRead` takes the transport.
- **"Both at once" is a class of its own**, in the table, the bar and the series. Trend's *Controller share* and
*Keyboard and mouse share* are the two exclusive classes; neither includes "both".
- **A mark is made from the series**: a controller's `input.dev.N.active` going from no value to a value is a
connection; a battery "fell to low" where its level crossed XInput's *low*, or 10 %, downwards. The row's
`connects` decides whether the first rise was the session's start. Sixty marks a chart at most.
- **Steam's `appinfo.vdf` is read in format 41 only**; another format is refused with the reason, and the game's
page says N/A.
- **`InputTerms.MinimumPrivacyVersion` is `2.22` and is compared as "at least"**: a later Privacy Policy does not
stop the reading, and the next change to what is read raises the number in the same pull request.
- **No chart colour was added**: the four classes use roles the palette has. Under a Windows contrast theme two
of them share a colour; `ACCESSIBILITY.md` §Known limitations says what tells them apart.
- **`ShareBar`** is the base of `FgMixBar` and `InputShareBar`.
### Traps this train left
- **A cause I offered and then counted away**: "the holes are the sensor library's fifth tick" — 25 of 134 fell on
one. The pattern that was there (46 of 134 exactly five samples apart) was the Agent's own attach rule, found
by reading `SessionRecorder`, not by looking harder at the Overlay.
- **A fixture that proved nothing**: the case for a woken watchdog first churned `sl.common.dll`, which wakes
nobody — it is in neither the inventory nor the census — and passed. It was caught only because the case
asserts, from the log, that the watchdog *was* woken (0 early ticks). **A test of a mechanism asserts that the
mechanism ran.** `opengl32.dll` is the wake that unloads nothing under a hook.
- **Qodana's native report reads the tests**: `static_cast<unsigned long long>(a * b)` is
`bugprone-implicit-widening-of-multiplication-result`. Widen an operand, not the product.
- **A here-document with an apostrophe in it failed again.** Edit scripts are files.
- **No edit while a gate runs still holds when CI asks for one**: the Qodana fix went into a second worktree of
the lower branch, and reached the upper one by a merge.
- **The item's own text said "nothing is lost by it" of the holes**, on a reading of the Overlay alone. A reading
was lost at every return to step. Say what was looked at.
- **A stack of pull requests that are squash-merged**: when the lower one merges, GitHub deletes its branch and
retargets the upper one to `main`, which then conflicts with itself. Check `git diff origin/main <the lower
branch's last tip>` is empty, then `git merge -S -s ours origin/main` on the upper branch, and merge that up
the stack. **Look at `gh pr view` before pushing to a lower branch**: a push to a branch GitHub deleted
re-creates it (it happened once here, and the branch was deleted again).
- **An edit script that is run twice must change nothing the second time.** Two of this train's were not: the
guide's settings page listed *Controllers and input* twice (#468; fixed in #469) and `CLAUDE.md`'s layout said
the input types twice (#468; fixed in this pull request).
- **A picture of a window from a test does not show its charts**: ScottPlot's control does not draw through a
`VisualBrush`. Save each plot with `Plot.SavePng`. The picture is how two legends that covered their charts
were found; the test is not in the tree.
- **`MarkdownRendererTests` counts the embedded documents**: a new guide page is one more.
- **`plot.Add.Scatter([..], [..])` does not compile** — two overloads fit a collection expression; name the arrays.
- **A test cannot call `ChartPalette.For`**: it needs the App's resources. Parse the palette's XAML, as
`ChartMathTests` does.
- **FluentAssertions' `OnlyContain` fails on an empty collection** — which is what the real backend returns on a
PC with no controller.
- **A stored session of the test ledger with frames takes its own sensor blobs now** (`SessionWithFramesAsync`'s
`sensors`), with their own `t_ms`.
- **`GetLastInputInfo`'s time is not on `Environment.TickCount`'s clock once the PC has slept**: five hours apart
on the developer PC after a sleep of five hours. The reader never compares the two; a test of #467 did, passed
on every runner (they do not sleep) and failed the local gate before this release — fixed here
(`21_INPUT_DEVICES` §What is read). **The time actually played, next on the roadmap, must not make the same
assumption.**
- **Auto-merge does not wait for Qodana: it is advisory.** #470 merged with one notice of Qodana's on `main` (a
parameter used only for its null check) — a notice counts against the gate of zero, and the script that read the
local inspection's SARIF skipped notices. Fixed in this pull request, and the script counts them now. With
auto-merge on, read Qodana's report **before** the required checks finish, or enable auto-merge after it.
- **`dotnet format --verify-no-changes` through a pipe that counts lines says nothing when it fails** — print its
exit code. #470's first push carried a naming violation in a test fixture that way; `check` and the first
rehearsal (run 43646963371) caught it, and the second rehearsal is of the fixed tree.
### NEXT
1. ~~**The owner runs item 47**~~ **Run and read 2026-11-14** (item 47, *Run 2026-11-14*): the difference in
Cyberpunk 2077 is the driver's, the holes are gone from steady play, off means off, and the stop fired once.
2. **The two GPU labels were reworded on the owner's word** (D152, 2026-11-14; strings in three languages, the
guide — in `[Unreleased]`, not in a release yet). **D141's stop stays as it is, and nothing more of Reflex is read** (D153, the owner
the same evening: "it only has to tell whether the game has it or not; Kingdom Come: Deliverance II has no
Reflex in its settings" — so that session lost nothing to the stop). (f) and (g) are said: the App's *Low
Latency Mode* is off, and no hitch.
3. **`slAllocateResources`** keeps its patch (D135); looked at again when there are more sessions.
4. ~~**Train D**~~ **Advanced metrics is closed (D154, 2026-11-14): train D is not built.** The owner was shown
the catalog — 140 entries, 110 read — and what the ten entries of reach `Spike` hold (Streamline's own headers,
2.14.16: DLSS frame generation's options and state, the video-memory estimates, ray reconstruction's, Image
Scaling's and Dynamic Vibrance's options, the PCL markers), with what reading them takes: a function of ours
handed to the game in place of Streamline's (rule 4), which a game that fetched its functions before the
attach never calls. The owner: "Đóng luôn". The ten are `RefusedRoute` now, the guide no longer says a later
release reads more, and §M15 is decided. **What is next is the controller feature**, planned in a session of
its own.
1. **The owner runs item 48** and says *check*; a copy of the ledger and the Agent's log are read. What it shows
comes first: a route that failed is said in `LIMITATIONS.md`, a layout that is wrong is a parser fix with the
owner's bytes as its test, and the accuracy statement's sentence about controllers is the owner's to reword
once they have been read.
2. **Then the order the owner set on 2026-11-14: [`15_ROADMAP.md`](15_ROADMAP.md) §After the controller train.**
It is not repeated here. Its first item uses what this train stores.
### Left open by this session
- ~~**This release's own facts** — the tag's run, the digests, the delta — are not in any file yet: the release is cut
after this text. Record them in the next pull request, with what SonarCloud and Qodana said.~~ **Recorded
2026-11-14: 0.1.0-beta.49 was released 2026-11-14T11:12:44Z** (18:12 in the owner's time zone) from the signed
tag on `afe4984` (#459), by run 43587336452 — green at the first attempt, one run for the one tag push. Eight
assets; the seven digests of `SHA256SUMS.txt` equal the ones GitHub computed, and the portable package hashed
here equals its line; the five native libraries in it carry `FL_BUILD_ID v0.1.0-beta.49`, none of them
`-dirty`. The delta from beta.48 is 1 100 211 bytes beside a full package of 110 803 443 — "Delta processed
0452 files. 0023 patched, 0429 unchanged". The wiki was published by run 43588972123. **Two rehearsals on the
release branch**: run 43580081466 at `1ab2809`, and — after a test-only fix reached the branch — run
43581734484 at `9f94356`, whose tree is the released one (a delta of 1 134 949 bytes, the same file counts).
**SonarCloud analysed `afe4984`: the quality gate passed and no issue is open on `main`. Qodana's two reports,
CodeQL and `check` are green on that commit.** On the way two advisory checks did find something, each in a
test of this train and each fixed before its pull request merged: Qodana's native report on #456 (two
products widened after the multiplication), SonarCloud on #457 (a line of the log handed to `printf`). **The
train stopped once for the owner**: two signed merges timed out at the passphrase prompt after #457; it went on
when the owner had unlocked the key. The tag's message reads `FrameLedger 0.1.0-beta.49` where the tags before
it read the bare version — nothing reads it, and a pushed tag is not moved.
- **Why Cyberpunk 2077's active render is longer than its span without frame generation** — item 47's to say. A
third session that afternoon repeated it (233: 3.40 against 3.13 ms at 292 of 296 samples) and a session of
menus did not (232: 0 of 126).
- **The Agent's half of the holes is read from the code and fits the ledger; it is not measured.** And with both
sides on a second a slip of phase can still leave a sample without a report: item 47 counts them.
- **A game that exits by itself loses the batch of counts in hand** — under a minute. Not changed: nothing runs
at a process's exit.
- **Where the third of a second of a poll goes is not established** (the history file of beta.48 has what is
known). Not looked at in this train.
- **With the sensor interval above one second, some readings of the driver's report are not stored** — the oldest
of the two that wait is pushed out. Said in the guide; not changed.
- **No test runs the whole path through the real Agent**: the injected tests stop at the shared memory, the
sampler's and the pending queue's start from it.
- **Two install batches of beta.46 took 0.61 s and 1.26 s and nothing explains them.** Item 46's ten sessions had none
above 191 ms.
- **The Japanese strings are unreviewed**, as every `ja` string is; this release added none.
- **(c) and (h) of item 43**, which only the owner sees, are still not exercised.
- **Valor Mortis's crash at 51 s** (twice, beta.40 and beta.44) **and Black Myth: Wukong's fault in Steam's crash
handler at every exit** are not explained. One session of each with hooking off is the comparison that is missing.
- **What item 41 left unexercised**: a configure through the FidelityFX 2.3 loader (Cyberpunk 2077 with FSR frame
generation), a game with neither library.
- **A fault while a game is closing is not seen by a hooked session** (D127: written down, not changed).
- **`docs/LIST_GAME_TESTED.md` is as of 2026-11-06**: refreshing it is a new copy of the ledger and the owner's review.
- **Item 40 (d)** was not exercised and the owner has not said item 40 passed. **Items 36 (d) and 37 are still open.**
- **`LIMITATIONS.md` and the accuracy statement still say the processor's, the memory's and the motherboard's
sensors "have never been read on real hardware"** — the owner's to reword. The alpha line still rests (D98).
- ~~**This release's own facts** — the tag's run, the digests, the delta, what SonarCloud and Qodana said of the
released commit — are not in any file yet: the release is cut after this text. Record them in the next pull
request.~~ **Recorded 2026-11-15: 0.1.0-beta.50 was released 2026-11-14T23:41:15Z** (06:41 on 2026-11-15 in the
owner's time zone) from the signed tag on `5764d21` (#471), by run 43652686348 — green at the first attempt, one
run for the one tag push. Eight assets; the seven digests of `SHA256SUMS.txt` equal the ones GitHub computed,
and the portable package hashed here equals its line; the five native libraries in it carry `FL_BUILD_ID
v0.1.0-beta.50`, none of them `-dirty`, and both entry points are there. The delta from beta.49 is 3 099 231
bytes beside a full package of 111 085 471 — "Delta processed 0452 files. 0026 patched, 0426 unchanged". The
wiki was published by run 43654502311 (31 pages, the new *Controllers and input* among them). **The tag's
message reads `0.1.0-beta.50`**, the bare version again.
**Three rehearsals on the release branch, and the third is of the released tree**: run 43646963371 at `9c69a32`
failed in the quality gate on a naming violation in a test fixture of #470; run 43648289839 and run 43649328136
were cancelled as the tree moved (the test of the last-input time; Qodana's notice); run 43650415247 at
`d6e4685` passed, and `main` at `5764d21` is that tree (a delta of 3 112 641 bytes, the same file counts).
**`./build.ps1 check` ran green on the developer PC at `6dadd05`**; the two commits after it were inspected
(ReSharper's InspectCode, no problem of any severity) and the App's suite run again. The owner's
`%LOCALAPPDATA%\FrameLedger\rules` hashed the same before and after.
**SonarCloud analysed `5764d21`: the quality gate passed. Qodana's two reports, CodeQL and `check` are green
on that commit.** On the way: Qodana's managed report on #470 was red with one notice when auto-merge merged
it (fixed in #471, §Traps); SonarCloud passed #467 (81.4 % of new code covered) and #468 (83.6 %).
**One date is two dates**: the changelog, the README and this file say 2026-11-15, the owner's day; GitHub
shows the release on 2026-11-14 (UTC), and the legal texts in the installer are stamped 2026-11-14, the day
`release.yml` reads from UTC. Nothing reads either; a train that ends before 07:00 in the owner's time zone
will show it again.
- **The reader's cost with a controller connected is not measured** (`20_OPEN_QUESTIONS` §M17 f). With none it is
inside the noise.
- **A game run as administrator under an Agent that is not** has not been tried: Windows may not report input
into it. Item 48 (j).
- **Only Steam is read for what a store lists.** GOG, Epic, the Xbox app and itch read N/A.
- **The new block was looked at as pictures, in the dark and the light theme, not used by hand**; its rendering
under a contrast theme was reasoned from the palette, not looked at.
- **The Japanese strings are unreviewed**, as every `ja` string is; this train added about a hundred.
- **A session that was read while its game was never in front shows its controllers and no share** — by design;
whether that reads well is the owner's to say.
- **Carried from beta.49, unchanged** (its history file has each in full): the two long install batches of
beta.46; Valor Mortis's crash at 51 s and Black Myth: Wukong's fault at exit; what item 41 left unexercised;
item 40 (d), items 36 (d) and 37; (c) and (h) of item 43; `docs/LIST_GAME_TESTED.md` is as of 2026-11-06;
`LIMITATIONS.md` and the accuracy statement on the processor's, memory's and motherboard's sensors are the
owner's to reword; the alpha line rests (D98).
**Owner-only:** item 47; one session each of Valor Mortis and Black Myth: Wukong with hooking off; what item 41
**Owner-only:** item 48; one session each of Valor Mortis and Black Myth: Wukong with hooking off; what item 41
left unexercised; item 40 (d).
## Owner-only — no PR can close these
@@ -1011,6 +1032,65 @@ left unexercised; item 40 (d).
Latency: On**, V-Sync off, borderless at 2560×1440, 378 FPS on the game's counter. So the driver's
`bLowLatencyMode` on, at a multiplier of 1, is the game's menu, seen from both sides. **The owner's**: the wording of the two GPU labels — *idle time excluded /
included* does not describe a game whose active time is the longer.
48. **beta.50 — what a session was played with, read from real controllers** (D155–D163). **Everything this
release shows of controllers was built and checked against data written by hand: the developer has no
controller** (D157). This batch is the first time any of it meets one. **Not first on a game under the
user-mode exception's trial** (D38). Then say *check*; a copy of the ledger and the Agent's log are read.
(a) **The update shows the terms window once** (Privacy Policy 2.22, Disclaimer 2.18): accept it. If a game was
recorded after the update and before FrameLedger was opened, its summary says *Not read in this session* —
that is the terms being waited for (D156), not a fault.
(b) **The Xbox controller**: one session on its cable, one on Bluetooth, one on the wireless adapter if there
is one. Five minutes each, played with the controller.
(c) **The DualSense**: one session on its cable, one on Bluetooth.
(d) **Steam Input**: the DualSense in a Steam game with Steam Input on for it, and the same game with Steam
Input off.
(e) **One session, in this order, about two minutes each**: only the controller; only the keyboard and mouse;
hands off both; then Alt+Tab to another window and type there for a minute; then back to the game.
(f) **Unplug the controller and plug it back twice in one session** (or switch it off and on), noting roughly
when.
(g) **One session that starts on the Xbox controller, changes to the DualSense, and changes back.**
(h) **A game played with the keyboard and mouse only, no controller connected.**
(i) **A game that is not measured from inside** (hooking off, or refused) played with a controller.
(j) **A game run as administrator** while FrameLedger's Agent is not — if one is at hand.
(k) **One session with Settings ▸ Controllers and input off**; switch it back on afterwards.
(l) **A Steam game's page and a page of a game from another store**: the three rows at the end of *Details*.
(m) **How the games felt** — the reader looks ten times a second; a hitch at that rhythm, or when a controller
connects, is what to listen for.
**What each outcome means, written before the run.**
*(e): the three stretches read near two minutes each in their own class, and the minute typed elsewhere is in
no class — the time in front is a minute shorter than the time read* — the definitions hold on real input.
*The minute typed elsewhere is counted as keyboard and mouse* — the test for "the game is in front" is wrong
for that game (a window owned by another process, a launcher): say the game; `LIMITATIONS.md` names the case.
*The controller-only stretch reads as "both"* — something makes keyboard or mouse input while the controller
is used: Steam Input mapping it, the pad moving the pointer. Say which session; with Steam Input off (d) it
should read "controller".
*A controller was played with and is never "in use"* — look at the session's sources and the Agent's line
`input: run ended`: no reports with the registration accepted means Windows did not deliver a background
program that controller's reports on this PC; XInput silent means XInput answers only the program in front.
Either is a route that failed, said with its counters — and the App said N/A or "not in use", never a made-up
share.
*The Xbox controller reads "wired" on its cable, and four levels or nothing on Bluetooth; the DualSense reads
steps of ten per cent on its cable, and on Bluetooth a level only if something else had switched its full
reports on* — as `LIMITATIONS.md` says. Anything else is recorded and that page reworded.
*Steam Input on: one controller is listed, marked "also shown to games as an Xbox pad"* — the fold works. *Two
are listed, the DualSense and an Xbox pad* — it missed: give both rows' times in use.
*(f): the connections and drops equal the times it was done, and the marks sit where it was done* — the counts
are right. *More* — the connection flaps, or a controller that sleeps is counted as dropped: say the counts.
*(g): "By maker" shows both with two changes* — the owner's seventh point holds.
*(h): "No controller was connected during this session", and the keyboard and mouse have nearly all the time
in front.* *(i): the block is there in a session that was not hooked.*
*(j): every share is "no input" though the game was played* — Windows does not tell a program that is not
elevated about input into one that is: say so, and it goes into `LIMITATIONS.md` as measured.
*(k): the summary says "Not recorded for this session" and the row has no input figures* — off means off.
*(l): the Steam game says full, partial or "lists none"; the other says N/A; "Input libraries loaded" names a
library after a measured session.*
*The Agent's `input: run ended` lines*: the thread's processor time over the session's length. NFR-2 leaves
0.46 % of a core; a session with a controller is the first measurement of this (`20_OPEN_QUESTIONS` §M17 f).
Above that, say the number.
**A hitch every tenth of a second, a stutter when a controller connects or drops, a game that loses the
controller while FrameLedger records, or a fault**: switch *Controllers and input* off, say so, and send the
Agent's log. FrameLedger opens no controller and sends nothing to one (D159) — a controller that misbehaves
only while it records would contradict that and is the most important thing this batch could find.
**Answered 2026-08-05, do not re-ask:** remove `gameguard` and keep `guard` (approved
over a red `Rules` gate, with the reasoning recorded in the merge commit); vendor NVAPI
+141
View File
@@ -0,0 +1,141 @@
<!-- Moved from CHANGELOG.md's [Unreleased] when 0.1.0-beta.50 was cut, 2026-11-15 (D66). CHANGELOG.md lists every release. -->
## [0.1.0-beta.50] - 2026-11-15
**The fiftieth pre-release: what a session was played with.** FrameLedger now notes, with every session, whether
the game was played with a controller, with the keyboard and mouse, with both at once or with nothing — and which
controllers were connected, for how long, how often they connected and dropped, and how their batteries did. It
reads this from Windows, **outside the game**, so it is there for every game you record, measured from inside or
not. The same unsigned installer: verify its hash against `SHA256SUMS.txt`, then *More info → Run anyway*.
**The terms window appears once: Privacy Policy 2.22 and Disclaimer 2.18.** Both used to say FrameLedger never
reads input. It now reads that a controller, or the keyboard or mouse, **was in use** — never which button, stick
or key, never text, never where the mouse is, never a serial number or a Bluetooth address — and it sends nothing
to a controller. **Nothing of this is read until you have accepted the new terms**, and Settings ▸ Recording ▸
*Controllers and input* switches it off altogether.
**Read this before you rely on it: none of it had been read from a real controller when this was released.** The
developer has none. Every figure was checked against sessions written by hand, and each part of the reader says
in the session what it could and could not do. The owner's Xbox controller and DualSense are the first real ones
it meets, after this release; what they show goes into the next one. Until then, treat the controller figures as
new and unproven — a share that looks wrong may be wrong.
**What you will see.**
- **A session's summary has a section, *Played with***: a bar and a table of the time the game was in front by
what it was played with; how often you changed between a controller and the keyboard and mouse; each controller
with its connection, its time in use and connected, how often it connected and dropped, and its battery — the
state it was in longest and for how long; each maker's share when you used two; a chart of the whole session
second by second, and a chart of each battery. On a measured session's Frametime chart, *Controller marks* draws
a controller's connections, drops and low batteries across the frames.
- **A game's page ends its *Details* with three rows about controllers** — what Steam lists for the game (read
from the Steam app's own file on your PC; nothing is looked up online), which of Windows' controller libraries
the game had loaded, and how you have actually played it. Three pieces of evidence: FrameLedger does not decide
whether a game "supports controllers".
- **Trend** has *Controller share* and *Keyboard and mouse share*; **Compare** shows what each session was played
with; a CSV or JSON export, and a bug report, carry the same figures and each controller's model name — say so
before you share one.
- **The user guide has a page for it**, *Controllers and input*, and `LIMITATIONS.md` lists what it cannot tell:
it knows a controller was in use while the game was in front, not what the game did with it; the keyboard and
the mouse are one class; Xbox-compatible controllers and the DualSense are read for use, others are only listed;
a battery level is there only when the controller reports one to Windows.
**Also in this release**, from before the controller work: the two lines of the graphics card's time under
*Latency* say what each figure is (D152), and Advanced metrics is closed — the ten Streamline readings that were
"being studied" are "not read", with the reason (D154).
**A session that was not measured from inside** now has more than its length, its sensors and the reason: it has
the game's memory and what it was played with — everything FrameLedger reads from outside the game (D161).
### Added
- **A session's summary says what it was played with** (owner decisions D155-D163): **Played with** — a bar and a table
of the time the game was in front that was played with a controller, with the keyboard and mouse, with both at once
and with no input; how often you changed between them; each controller of the session with its connection, the time
in use and connected, how often it connected and dropped, and its battery — the state it was in longest and for how
long, the first and last level, how fast it ran down; and each maker's share when two were used. Two charts follow:
**Input over the session** and **Controller battery**. On a measured session's Frametime chart, **Controller marks**
draws a controller's connections, drops and low batteries across the frames. For every session, measured from inside
or not. **Trend** has *Controller share* and *Keyboard and mouse share*, **Compare** has *Played with* and
*Controllers*, and a CSV export has an `# input:` line. The user guide has a page for it, *Controllers and input*.
Checked against synthetic sessions only: no controller had been read when this was written.
- **A session records what it was played with — a controller, the keyboard and mouse, both, or neither** (D155–D163,
the owner's decisions of 2026-11-14; *Settings ▸ Controllers and input*, on unless you switch it off). While a game
is recorded, FrameLedger's agent notes — from Windows, never from the game — which game controllers are connected
and in use, their battery level, and whether the keyboard or mouse is in use, and the session stores how the time
the game was in front divides between them, how often each controller connected and dropped, and its battery. It
works for a game FrameLedger does not measure too. **No button, stick, key or text is kept; nothing is sent to a
controller; and nothing is read until you have accepted the Privacy Policy that describes it** — after this
update, sessions recorded before FrameLedger has been opened once have no such figures. The screens that show the
figures come with the same release. Xbox-compatible controllers and the DualSense are read for use; another
controller is listed and never counted as in use. **None of this had been read from a real controller when it was
written** — it was checked against data written by hand (`LIMITATIONS.md` §Controllers and input).
- **A game's page says what is known about controller support — three things, and no verdict** (D163). *Controller
support (store)*: what Steam lists for the game — full, partial, or none — read from the Steam app's own file on
your PC when you open the page; nothing is asked of the store, and a game that is not Steam's reads N/A. *Input
libraries loaded*: which of XInput, DirectInput, Windows.Gaming.Input, GameInput and SDL the game had loaded the
last time it was measured from inside. *Usually played with*: the share of the time in front with a controller,
the keyboard and mouse, both and neither, over the sessions that recorded it. English, Vietnamese, Japanese.
- **The terms are shown once: Privacy Policy 2.22 and Disclaimer 2.18.** Both said FrameLedger never reads input.
They now say what is read — that a controller, or the keyboard or mouse, is in use — what is kept, and what never
is (`docs/legal-drift-history.md`).
- **For developers: the arithmetic of controller statistics, with nothing reading a device yet** (D155–D163, the
owner's decisions of 2026-11-14; `docs/21_INPUT_DEVICES.md`, `docs/03_METRICS.md` §Input). `FrameLedger.Domain.Input`
says whether an XInput state or a DualSense report is a pad in use and what its battery is, adds a battery's readings
up, counts switches, and decides when two entries are one pad seen twice; `Application.Input` holds one session's
slices and turns them into a reading a second; `InputSessionBuilder` turns a session's readings into its totals, its
controllers as JSON and its timeline. A telemetry sample can carry a reading; none does. **Every byte and reading
under test was written by hand — no report from a real controller has passed through this code.**
- **For developers: a session can store what it was played with — schema 0024** (D160; `docs/06_DATA_MODEL.md`). Nine
columns on `sessions` (the time in front and its four classes, the switches of method, the sources that answered,
the controllers as JSON) and three on `games` (what a store lists of controller support), ADD COLUMN only; the
`.partial` file gains chunk 11, so a session recovered after the Agent died keeps its readings; the finalizer
stores them for hooked and unhooked sessions alike; the input series are `sensor_blobs` rows named `input.*`, which
the sensors' read leaves out. Nothing produces a reading yet. **A ledger this build has opened cannot be opened by
0.1.0-beta.49 or earlier.**
- **For developers: the input reader, which the Agent does not start yet** (D155, D158, D159; `docs/21_INPUT_DEVICES.md`
§The reader). `Application.Input.InputReader` takes a slice about ten times a second from
`Infrastructure.Input.Win32InputBackend` — raw input for joysticks and gamepads delivered to a window that is never
shown, three of XInput's getters, the time of the last keyboard or mouse input, the window in front — on the thread
of `InputDeviceHub`, which exists only while a session has a view of it. It opens no device, sends nothing to one,
and registers for no keyboard or mouse. A new gate, `tools/input-readonly-check.ps1`, holds the reader's Windows
calls to a committed list and refuses, on the list or off it, a call that sends to a device, injects input or reads
a key; no other managed source and no native source may name an input function. **With no controller at hand, what
the reader does with one connected is not established**: its tests use a Windows whose answers they write, and one
suite runs it on the real Windows of the machine and asserts only that it opens, answers and closes.
### Changed
- **Advanced metrics is closed: the ten readings that were "being studied" are now "not read", with the reason**
(D154, the owner's decision). What a game sets and asks through Streamline's own functions for a feature — DLSS
frame generation's options and state, the video memory DLSS estimates for itself, the options of ray
reconstruction, Image Scaling and Dynamic Vibrance, the PC-latency markers — is reached only by handing the game
a function of FrameLedger's in place of Streamline's, which is refused. The *Sources* list says so, in English,
Vietnamese and Japanese, and the guide no longer says a later release reads more. Nothing that was read stops
being read.
- **The two lines of the graphics card's time say what each is, not which holds the other** (D152, the owner's
decision). *GPU active render (idle time excluded)* and *GPU render, start to end (idle time included)* are now
*GPU active render (the driver's own figure)* and *GPU render (between the driver's start and end marks)*, in
English, Vietnamese and Japanese, and the guide says why: in Cyberpunk 2077 without frame generation the
driver's active time is longer than its two marks are apart. The numbers are unchanged.
- **The guide's page on Advanced metrics says what two of the driver's switches mean** (`guide/12`): the latency
report is there in a game that has Reflex built in, whether Reflex is on or off in its menu; `bUseGameSleep`
says the game calls Reflex's sleep — NVIDIA asks for that even with Reflex off — and `bLowLatencyMode` is the
one that says the mode is on; frame generation needs Reflex, not the reverse. From NVIDIA's Streamline guide
for Reflex, and from the owner's ten sessions on 0.1.0-beta.49.
### Documentation
- **Owner-only item 47 was run and read** (`docs/HANDOFF.md`): in Cyberpunk 2077 without frame generation the
driver's active GPU time is longer than its own two marks are apart on 4 917 of 5 394 frames (1 849 µs beside
1 571 µs) and on none of 129 900 frames in five other games — the difference is the driver's; samples without a
report are now confined to a game's start; a session with the option off has no latency line; and the stop of
D141 fired in a real game for the first time (Kingdom Come: Deliverance II, one call of 5.3 ms while it
started).
- **Streamline's programming guides for Reflex and for DLSS Ray Reconstruction (2.14.16) read against the code**
(`docs/spike-notes/30-reflex-latency.md`, *Added 2026-11-14*). Ray reconstruction was already measured the way
the guide describes; two comments in the Overlay's source and one line of `17_HOOK_ENGINE` said super
resolution and ray reconstruction run together, and they do not. `03_METRICS` and `05_DETECTION` no longer
promise "PC latency as reported by Reflex" (D147). No code changed: comments only.
+125
View File
@@ -0,0 +1,125 @@
# HANDOFF history — 0.1.0-beta.49
*Moved verbatim from `docs/HANDOFF.md` when 0.1.0-beta.50 was cut, 2026-11-15 (owner decision D66); `docs/HANDOFF.md` §How this file is split lists every part. Nothing below was edited, so its "below" and "above" mean HANDOFF.md as it stood then, and a path is relative to `docs/`.*
## **START HERE** — 2026-11-14, 0.1.0-beta.49: item 46 read; the frames counted for the log, Reflex and frame generation together; a read a second on a grid; the Agent keeps the reading that waits
*Status is `docs/changelog/0.1.0-beta.49.md`; this is what no other file carries.* The owner ran item 46 on
beta.48 the afternoon it was released — ten sessions, then eight more — and said: check (#455, and item 46's last
paragraphs, below). The read works, the samples are a second apart, both games give both of the driver's own
times, the multipliers are listed, off means off, **and the owner's word: no hitch**. Two things were left, the
owner said *do both*, and four answers given while planning made the train (D148–D151): #456 (the Overlay counts
each summed frame for its log), #457 (the watchdog's periodic tick on a grid), #458 (the Agent keeps the reading
that waits; the guide on whose switches the table shows), and this release. **beta.48's own section, its traps
and its release facts are [`handoff/history/0.1.0-beta.48.md`](handoff/history/0.1.0-beta.48.md).**
### What this release decided, beyond D148–D151
- **The counts are of each frame's own two numbers, with sums, and no threshold.** The draft counted spans of no
length; a sample whose mean span is half a microsecond says spans of one or two microseconds exist, and a count
of exact zeros would have read "the driver's" where it was "ours". So the frames that have both a span and an
active time are kept in two heaps — active longer than the span, or not — each with its count and both sums.
- **A batch's state is three things**: the driver's low-latency switch, its "the game sleeps" switch
(`bUseGameSleep`: NVAPI's "is `NvAPI_D3D_Sleep()` being called") and its frame-generation multiplier. The second
was added on the owner's word — Reflex goes with frame generation in the owner's games, and the low-latency
switch can be the NVIDIA App's override — and Clair Obscur's two sessions read exactly that: `bUseGameSleep`
off throughout without frame generation, on with ×3.
- **Only the driver read and the publication are the periodic tick's.** The request is still followed on every
tick, so the hooks a session asks for go in on the tick the loader woke — a game that has just loaded
Streamline calls it at once. A draft that moved the whole block would have missed those calls.
- **One read is armed at every periodic tick, and the grid is what keeps two apart**: half a second at the least,
after a tick that ran that late. "At most once a second" is no longer said anywhere.
- **A session's first publication may hold a moment's worth.** A request seen on a woken tick is published by the
periodic tick that follows, however soon. One test read a single publication as complete and had to stop.
- **The Agent keeps two sets, and an empty one does not wait.** A reading can stand at the sample after the one it
would have ridden — a second later. With the sensor interval above a second the oldest is still pushed out.
- **No legal text changed (D149)**, although a bug report carries the Overlay's logs and so these lines: the
owner was told and chose it. The Privacy Policy names the logs of the component loaded into games.
- **The plan was reviewed against the source by a second reader before the owner saw it, and sixteen things in
the draft were wrong** — among them the three above, and the whole of the Agent's half, which the draft did not
have.
### Traps this train left
- **A cause I offered and then counted away**: "the holes are the sensor library's fifth tick" — 25 of 134 fell on
one. The pattern that was there (46 of 134 exactly five samples apart) was the Agent's own attach rule, found
by reading `SessionRecorder`, not by looking harder at the Overlay.
- **A fixture that proved nothing**: the case for a woken watchdog first churned `sl.common.dll`, which wakes
nobody — it is in neither the inventory nor the census — and passed. It was caught only because the case
asserts, from the log, that the watchdog *was* woken (0 early ticks). **A test of a mechanism asserts that the
mechanism ran.** `opengl32.dll` is the wake that unloads nothing under a hook.
- **Qodana's native report reads the tests**: `static_cast<unsigned long long>(a * b)` is
`bugprone-implicit-widening-of-multiplication-result`. Widen an operand, not the product.
- **A here-document with an apostrophe in it failed again.** Edit scripts are files.
- **No edit while a gate runs still holds when CI asks for one**: the Qodana fix went into a second worktree of
the lower branch, and reached the upper one by a merge.
- **The item's own text said "nothing is lost by it" of the holes**, on a reading of the Overlay alone. A reading
was lost at every return to step. Say what was looked at.
### NEXT
1. ~~**The owner runs item 47**~~ **Run and read 2026-11-14** (item 47, *Run 2026-11-14*): the difference in
Cyberpunk 2077 is the driver's, the holes are gone from steady play, off means off, and the stop fired once.
2. **The two GPU labels were reworded on the owner's word** (D152, 2026-11-14; strings in three languages, the
guide — in `[Unreleased]`, not in a release yet). **D141's stop stays as it is, and nothing more of Reflex is read** (D153, the owner
the same evening: "it only has to tell whether the game has it or not; Kingdom Come: Deliverance II has no
Reflex in its settings" — so that session lost nothing to the stop). (f) and (g) are said: the App's *Low
Latency Mode* is off, and no hitch.
3. **`slAllocateResources`** keeps its patch (D135); looked at again when there are more sessions.
4. ~~**Train D**~~ **Advanced metrics is closed (D154, 2026-11-14): train D is not built.** The owner was shown
the catalog — 140 entries, 110 read — and what the ten entries of reach `Spike` hold (Streamline's own headers,
2.14.16: DLSS frame generation's options and state, the video-memory estimates, ray reconstruction's, Image
Scaling's and Dynamic Vibrance's options, the PCL markers), with what reading them takes: a function of ours
handed to the game in place of Streamline's (rule 4), which a game that fetched its functions before the
attach never calls. The owner: "Đóng luôn". The ten are `RefusedRoute` now, the guide no longer says a later
release reads more, and §M15 is decided. **What is next is the controller feature**, planned in a session of
its own.
### Left open by this session
- ~~**This release's own facts** — the tag's run, the digests, the delta — are not in any file yet: the release is cut
after this text. Record them in the next pull request, with what SonarCloud and Qodana said.~~ **Recorded
2026-11-14: 0.1.0-beta.49 was released 2026-11-14T11:12:44Z** (18:12 in the owner's time zone) from the signed
tag on `afe4984` (#459), by run 43587336452 — green at the first attempt, one run for the one tag push. Eight
assets; the seven digests of `SHA256SUMS.txt` equal the ones GitHub computed, and the portable package hashed
here equals its line; the five native libraries in it carry `FL_BUILD_ID v0.1.0-beta.49`, none of them
`-dirty`. The delta from beta.48 is 1 100 211 bytes beside a full package of 110 803 443 — "Delta processed
0452 files. 0023 patched, 0429 unchanged". The wiki was published by run 43588972123. **Two rehearsals on the
release branch**: run 43580081466 at `1ab2809`, and — after a test-only fix reached the branch — run
43581734484 at `9f94356`, whose tree is the released one (a delta of 1 134 949 bytes, the same file counts).
**SonarCloud analysed `afe4984`: the quality gate passed and no issue is open on `main`. Qodana's two reports,
CodeQL and `check` are green on that commit.** On the way two advisory checks did find something, each in a
test of this train and each fixed before its pull request merged: Qodana's native report on #456 (two
products widened after the multiplication), SonarCloud on #457 (a line of the log handed to `printf`). **The
train stopped once for the owner**: two signed merges timed out at the passphrase prompt after #457; it went on
when the owner had unlocked the key. The tag's message reads `FrameLedger 0.1.0-beta.49` where the tags before
it read the bare version — nothing reads it, and a pushed tag is not moved.
- **Why Cyberpunk 2077's active render is longer than its span without frame generation** — item 47's to say. A
third session that afternoon repeated it (233: 3.40 against 3.13 ms at 292 of 296 samples) and a session of
menus did not (232: 0 of 126).
- **The Agent's half of the holes is read from the code and fits the ledger; it is not measured.** And with both
sides on a second a slip of phase can still leave a sample without a report: item 47 counts them.
- **A game that exits by itself loses the batch of counts in hand** — under a minute. Not changed: nothing runs
at a process's exit.
- **Where the third of a second of a poll goes is not established** (the history file of beta.48 has what is
known). Not looked at in this train.
- **With the sensor interval above one second, some readings of the driver's report are not stored** — the oldest
of the two that wait is pushed out. Said in the guide; not changed.
- **No test runs the whole path through the real Agent**: the injected tests stop at the shared memory, the
sampler's and the pending queue's start from it.
- **Two install batches of beta.46 took 0.61 s and 1.26 s and nothing explains them.** Item 46's ten sessions had none
above 191 ms.
- **The Japanese strings are unreviewed**, as every `ja` string is; this release added none.
- **(c) and (h) of item 43**, which only the owner sees, are still not exercised.
- **Valor Mortis's crash at 51 s** (twice, beta.40 and beta.44) **and Black Myth: Wukong's fault in Steam's crash
handler at every exit** are not explained. One session of each with hooking off is the comparison that is missing.
- **What item 41 left unexercised**: a configure through the FidelityFX 2.3 loader (Cyberpunk 2077 with FSR frame
generation), a game with neither library.
- **A fault while a game is closing is not seen by a hooked session** (D127: written down, not changed).
- **`docs/LIST_GAME_TESTED.md` is as of 2026-11-06**: refreshing it is a new copy of the ledger and the owner's review.
- **Item 40 (d)** was not exercised and the owner has not said item 40 passed. **Items 36 (d) and 37 are still open.**
- **`LIMITATIONS.md` and the accuracy statement still say the processor's, the memory's and the motherboard's
sensors "have never been read on real hardware"** — the owner's to reword. The alpha line still rests (D98).
**Owner-only:** item 47; one session each of Valor Mortis and Black Myth: Wukong with hooking off; what item 41
left unexercised; item 40 (d).
+22
View File
@@ -63,6 +63,28 @@ are kept because they record what each version changed and why (owner decision D
>
> Version 2.5 (2026-09-27, 0.1.0-beta.10) adds how a tracked game's window is shown — read from Windows — and the engine build name read from an Unreal Engine game's executable. It is also the first version to say two things the software already did: it reads the **content** of a library game's executable (markers in its first 8 MB and its import table, since the detection of engines and features; and, when a session starts, the graphics-library markers in the whole file), and it reads the processor load and the memory in use (since 0.1.0-beta.3). Nothing here leaves your device, as before.
### What version 2.22 of the Privacy Policy and 2.18 of the Disclaimer changed (0.1.0-beta.50)
**Both documents said FrameLedger never reads input, and it now reads that a controller, or the keyboard or mouse,
is in use** (owner decisions D155–D163; the sentences were shown to the owner with the plan of 2026-11-14 and
approved with it). Until this version the Privacy Policy's §4 said it "does not read game saves, chat, input
content", the Disclaimer's §1 that it never reads "save files, input, chat", the README that it "never touches saves
or input", and the guide that it never reads "your input". The **Privacy Policy** (2.22) adds to §1 what a session
stores of controllers and input and what it never does — which button, stick, trigger or key, text, the mouse's
position, a serial number, a Bluetooth address; to §3A that these numbers, unlike Advanced metrics', **are** in an
export and in a bug report (D160); to §4 what is observed — the controllers' reports, looked at and not kept,
XInput's state and battery, the time of the last keyboard or mouse input, the window in front — and that nothing is
opened or sent — and that the Steam app's own file of store records is read, on the disk, when a game's page is
opened, for whether the game is listed with controller support; and narrows the sentence after it to what is still
true. It also says, in §1 and §4, that nothing
of this is read until that version has been accepted on the PC (D156): the option is on unless switched off, and an
Agent that started before the App showed the document records without it. The **Disclaimer** (2.18) gains a
paragraph in §1 for what is read from outside the game about controllers, the keyboard and the mouse, and its "what
it never does" names what is kept instead of the word "input", and adds that nothing is sent to a controller
(D159). The **accuracy statement** — and so the README and the Disclaimer — gains a paragraph that ends: none of
this had been read from a real controller when it was written. The trademarks notice names Sony's and Nintendo's
products, which the App now shows as a controller's model.
### What version 2.21 of the Privacy Policy and 2.17 of the Disclaimer changed (0.1.0-beta.48)
**Two real games had been read, and the texts still said none** (owner decisions D142–D145; the wording's main
+2
View File
@@ -66,6 +66,8 @@ correct it by hand — your correction is labelled as yours.
upscaling), and when it changed.
- **Sensors** — temperatures, load and power; video memory; memory; and the card's clocks and fan, with the moments it
was held back shaded. The game's own line and the whole card's or the whole PC's are drawn separately.
- **Input over the session** and **Controller battery** — what each second was played with, and each controller's
battery level ([Controllers and input](13-controllers.md)).
- **Trend** (on the game's page) — one point per session over time, for example before and after a driver update.
Each day your graphics driver, graphics card, processor, display or Windows changed is a dashed line with a number
above the chart, 1 for the oldest; the list under the chart says what changed that day, and pointing at the line
+4 -2
View File
@@ -16,8 +16,10 @@ your decision and your risk.
refuses — or stops measuring at the next check — and turns hooking off for that game. **There is no switch that
overrides this**, apart from the one narrow exception below.
- **It never hides.** It keeps its real name and does nothing to avoid being seen by security software.
- **It never reads or changes the game's memory**, its saves or your input. It only observes the graphics calls the
game makes.
- **It never reads or changes the game's memory** or its saves, and never what you type or which buttons you press.
Inside the game it only observes the graphics calls the game makes. From outside it — unless you switch
*Controllers and input* off in Settings — it notes whether a controller, or the keyboard or mouse, is in use, and
sends nothing to a controller.
## What it cannot promise
+3
View File
@@ -42,6 +42,9 @@ An exported **CSV** or **JSON** file, and a bug report, can contain:
- your games' names and **the paths to their files**, which include your **Windows user name** when a game is installed
in your user folder;
- your PC's processor, graphics card, driver and Windows version;
- what each session was played with: the time with a controller and with the keyboard and mouse, and each
controller's model name, how it was connected, its battery levels and how often it connected and dropped — never a
button, a key, a serial number or an address ([Controllers and input](13-controllers.md));
- your tags and notes.
Look at a file before you share it. **Help ▸ Report a bug…** builds the report on your PC, shows you every file in it,
+7 -1
View File
@@ -90,7 +90,9 @@ stopped, hooking turned off — each with one button that only says you have rea
Read [Anti-cheat and safety](04-anti-cheat-and-safety.md) before you do.
- **Anti-cheat** — shown in its place when anti-cheat was found: what was found, and where. **User-mode exception**
appears when the game qualifies for the one exception.
- **Supports** and **Details** — what the game's own files contain, as far as FrameLedger can tell.
- **Supports** and **Details** — what the game's own files contain, as far as FrameLedger can tell. **Details** ends
with three rows about controllers — what the store lists, which input libraries the game loaded, and how you have
played it ([Controllers and input](13-controllers.md)).
- **Tabs:** **Sessions** (every session: double-click a row or press **Open**; **Delete all sessions…** at the top),
**Frametime**, **Distribution**, **Trend** (one point per session for a figure you choose; each day your hardware,
driver, display or Windows changed is numbered on the chart and listed under it), **Sensors**, and **Latency** when
@@ -106,6 +108,10 @@ It opens from a session row, from the Dashboard, and from the notice when a sess
- The figures, the charts and **Statistics per series** — [Read your results](03-read-your-results.md) explains each.
- **Frame generation in this session** — a bar and a table of every frame-generation state the session held, when it
held more than one, with how frame generation was set.
- **Played with** — what the session was played with: a bar and a table of the time with a controller, with the
keyboard and mouse, with both and with no input; the session's controllers with their connections and batteries;
and two charts over the session ([Controllers and input](13-controllers.md)). Above the Frametime chart,
**Controller marks** draws a controller's connections, drops and low batteries across the frames.
- **Tags and notes** with **Save**, and **Export CSV**, **Export JSON**, **Export PNG**.
- **Advanced metrics…**, for a session recorded with Advanced metrics on: it opens that session on the Advanced page.
+1
View File
@@ -22,6 +22,7 @@ The link under them, *Read what the hook does and does not do*, opens the safety
| **Minimum session length (s)** | A shorter session is not kept. 5 to 600 seconds. *Agent.* | 30 |
| **Sensor interval (ms)** | How often the PC's sensors are read during a session. 500 to 2000 ms. With a value above 1000, not every reading of NVIDIA's latency report — made about once a second inside the game — becomes a point: each point is still one reading ([Advanced metrics](12-advanced-metrics.md)). *Agent.* | 1000 |
| **Raw series kept per game** | How many of each game's newest sessions keep their per-frame data; older ones keep their statistics. 0 keeps everything. *Agent.* | 20 |
| **Controllers and input** | Records what a session was played with: which game controllers were connected and in use, their battery level, and whether the keyboard or mouse was in use — as times, read from Windows and never from the game. No button, stick, key or text is kept, and nothing is sent to a controller. Nothing is read until you have accepted the Privacy Policy that describes it, so after an update the first sessions have no such figures until FrameLedger has been opened once. Off: nothing of this is read or stored. It applies from the next session; a session recorded while it was off is not filled in later. *Agent.* | On |
| **Advanced metrics** | Reads more from the graphics driver and the hardware sensors during a session — the graphics card's memory and load in detail, each fan and voltage, what your display can do, the driver's settings for the game — and stores it with the session. In a game FrameLedger measures from inside it also reads what the game tells DLSS, Streamline and FSR, and — on an NVIDIA card, in a Direct3D 12 game that uses NVIDIA's library — asks the graphics driver about once a second how long each stage of a frame took ([Advanced metrics](12-advanced-metrics.md)). Off: nothing more is read or stored. It applies from the next session; a session recorded while it was off is not filled in later. While it is on, the **Advanced** page is in the list on the left ([Advanced metrics](12-advanced-metrics.md)). *Agent.* | Off |
## Data
+60
View File
@@ -0,0 +1,60 @@
# Controllers and input
With each session FrameLedger notes **what the game was played with**: a controller, the keyboard and mouse, both at
once, or nothing at all — and which controllers were connected, for how long, and how their batteries did.
It reads this **from Windows, outside the game**, so it works for every game you record, measured from inside or
not. It never reads which button, stick or key you pressed, never text, never where the mouse is, and it never sends
anything to a controller.
## Switch it off, and when it starts
Settings ▸ Recording ▸ **Controllers and input** is on unless you switch it off. Nothing is read until you have
accepted the Privacy Policy that describes it: after an update, open FrameLedger once and accept the new terms. A
session recorded before that says *Not read in this session* and is not filled in later.
## In a session's summary: Played with
- **The bar and the table** — the share of the time **the game's window was in front** that was played with a
controller, with the keyboard and mouse, with both at once, and with no input. Time when another window was in
front is left out: typing in a chat window is not playing with the keyboard.
- **Changes between a controller and the keyboard and mouse** — how many times you went from one to the other.
- **Controllers** — each controller of the session: its name, how it was connected (USB, Bluetooth, a wireless
adapter), how long it was in use and how long connected, how many times it connected and dropped, and its battery:
the state it was in longest and for how long, its first and last level, and how fast it ran down when that could
be worked out.
- **By maker** — when controllers of two makers were used: each maker's share of the time, and how often you changed.
- **Input over the session** — a chart with one row for each way of playing and a mark for every second; dashed and
dotted lines show when a controller connected, dropped, or its battery fell to low.
- **Controller battery** — each controller's level over the session. An Xbox controller reports four levels (empty,
low, medium, full), drawn as steps; a DualSense reports steps of ten per cent.
- On the **Frametime** chart of a measured session, **Controller marks** draws the same connections, drops and low
batteries across the frames — so a stutter at the moment a controller dropped can be seen as one.
## On a game's page
**Details** ends with three rows. They are evidence, not a verdict — FrameLedger does not decide whether a game
"supports controllers":
- **Controller support (store)** — what Steam lists for the game: full, partial, or nothing. Read from the Steam
app's own file on your PC; nothing is looked up online. A game from another store reads N/A.
- **Input libraries loaded** — which of Windows' controller libraries the game had loaded the last time it was
measured from inside. Many games load one whether they use a controller or not.
- **Usually played with** — the shares over every session of the game that recorded them.
**Trend** has two more figures, **Controller share** and **Keyboard and mouse share**, and **Compare** shows what each
session was played with.
## What it cannot tell
- It knows a controller was **in use while the game was in front** — not what the game did with it.
- The keyboard and the mouse are **one** class; FrameLedger reads only the time of the last input, never a key.
- Input a program makes — Steam Input mapping a controller to keys, a macro tool — counts as keyboard and mouse.
- **Xbox-compatible controllers and the DualSense** are read for use. Other controllers are listed with their
connections and are not counted as in use.
- A battery level is there only when the controller reports one to Windows: an Xbox controller on a cable reads
*wired*, and a DualSense on Bluetooth may report none.
- When Steam Input stands in front of a controller, Windows shows it twice; FrameLedger counts it once and says so.
The full list is on [Limitations](../LIMITATIONS.md#controllers-and-input). What is read and kept is in the Privacy
Policy (Help ▸ Legal), and [Your data](05-your-data.md) says what an export carries.
+3 -2
View File
@@ -4,7 +4,7 @@ FrameLedger records how your games run on this PC — frame rate, frame times, t
with, temperatures, and how much memory the game uses — and keeps every session so you can compare them later.
Everything stays on your PC.
Each page below takes a minute or two to read. The first six are the guide; the next six are there to look things up.
Each page below takes a minute or two to read. The first six are the guide; the next seven are there to look things up.
1. [Install and first start](01-install.md)
2. [Record a game](02-record-a-game.md)
@@ -18,7 +18,8 @@ Each page below takes a minute or two to read. The first six are the guide; the
10. [Words FrameLedger uses](10-glossary.md)
11. [Alpha builds](11-alpha-builds.md) — the experimental builds on a new .NET, and how to go back
12. [Advanced metrics](12-advanced-metrics.md) — everything the driver and the sensors say, if you switch it on
13. [The terms, in plain words](terms-in-plain-words.md)
13. [Controllers and input](13-controllers.md) — what a session was played with, and each controller's battery
14. [The terms, in plain words](terms-in-plain-words.md)
What FrameLedger cannot do is listed on its own page: [Limitations](../LIMITATIONS.md) (in the app: Help ▸
Limitations). How it works with the keyboard alone, a screen reader or a contrast theme, and how to report a problem:
+11 -1
View File
@@ -12,7 +12,7 @@
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-11-11.** The software is a beta; its latest
> **beta is `0.1.0-beta.49`** (2026-11-14), an unsigned installer built from that tag with its
> **beta is `0.1.0-beta.50`** (2026-11-15), an unsigned installer built from that tag with its
> checksums published beside it (alphas — experimental builds that try a newer .NET — are published apart). The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -106,6 +106,16 @@
> temperature in every session, and, on NVIDIA cards only, how much of the time its power limit or its temperature held
> it back, read once a second; and frames per watt — the game's own frames per second for each watt the graphics card
> drew, never counting generated frames, `N/A` where the game's own frame rate is not known.
> - **Controllers and input (since beta.50; on unless you switch it off in Settings, and only once you have accepted
> the Privacy Policy that describes it):** how much of the time a game was in front it was played with a
> controller, with the keyboard or mouse, with both or with neither; each controller's connections and drops; its
> battery. All of it is read from Windows, from outside the game: it says a controller was in use while the game
> was in front, not what the game did with it. Keyboard and mouse are one figure — only the time of the last input
> is read — and input a program injects (Steam Input mapping a controller to keys, a macro tool) counts as keyboard
> and mouse. An Xbox-compatible controller and a DualSense are read for use; another maker's controller is listed
> and never counted as in use. A DualSense on Bluetooth reports its battery only where Steam or the game has
> switched it to its long report, and an Xbox controller on Bluetooth may report none. **None of this had been
> read from a real controller when it was written (2026-11-14)**: it was checked against data written by hand.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
+15 -3
View File
@@ -1,6 +1,6 @@
# FrameLedger — Disclaimer
**Version:** 2.17 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.18 · **Effective:** {{RELEASE_DATE}}
## 0. This is pre-release software
@@ -47,9 +47,11 @@ Install it somewhere only you can write to, and verify the published SHA-256 che
**What it reads about the game from outside it, in every session:** the game process's own memory use — its dedicated and shared video memory and its working sets, the figures Windows' Task Manager shows — from Windows' performance counters and process-memory information. For a game it does not inject into, FrameLedger opens the game's process for this with the least access Windows offers, once a second, and closes it again; it reads nothing inside the process.
**What it reads about controllers, the keyboard and the mouse, from outside the game, unless you switch it off:** which game controllers are connected, whether one is in use, its battery level, and the time of the last keyboard or mouse input — to say how much of a session was played with a controller and how much with the keyboard or mouse. It asks Windows, never the game; it opens no controller and sends nothing to one; and it keeps no key, button or text (the Privacy Policy says exactly what is kept). It reads none of this until you have accepted the Privacy Policy that describes it.
> **What of that list is observed today is stated once, in §4 below** (the block `legal/ACCURACY.md` carries, dated). The list here describes what the software is designed to observe, and the boundary — API arguments, and the one report asked of the graphics driver that the line above names; nothing of the game's own memory — holds for all of it.
**What it never does:** read or write the game's memory outside those API arguments; read save files, input, chat, or network traffic; modify game behavior; hide itself from any security software; or install a kernel driver of its own.
**What it never does:** read or write the game's memory outside those API arguments; read save files, chat, or network traffic; read what you type or which buttons you press — it keeps only whether a controller, or the keyboard or mouse, was in use, read from Windows and never from the game; send anything to a controller; modify game behavior; hide itself from any security software; or install a kernel driver of its own.
## 2. Anti-cheat systems — the main risk to you
@@ -125,7 +127,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-11-11.** The software is a beta; its latest
> **beta is `0.1.0-beta.49`** (2026-11-14), an unsigned installer built from that tag with its
> **beta is `0.1.0-beta.50`** (2026-11-15), an unsigned installer built from that tag with its
> checksums published beside it (alphas — experimental builds that try a newer .NET — are published apart). The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -219,6 +221,16 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> temperature in every session, and, on NVIDIA cards only, how much of the time its power limit or its temperature held
> it back, read once a second; and frames per watt — the game's own frames per second for each watt the graphics card
> drew, never counting generated frames, `N/A` where the game's own frame rate is not known.
> - **Controllers and input (since beta.50; on unless you switch it off in Settings, and only once you have accepted
> the Privacy Policy that describes it):** how much of the time a game was in front it was played with a
> controller, with the keyboard or mouse, with both or with neither; each controller's connections and drops; its
> battery. All of it is read from Windows, from outside the game: it says a controller was in use while the game
> was in front, not what the game did with it. Keyboard and mouse are one figure — only the time of the last input
> is read — and input a program injects (Steam Input mapping a controller to keys, a macro tool) counts as keyboard
> and mouse. An Xbox-compatible controller and a DualSense are read for use; another maker's controller is listed
> and never counted as in use. A DualSense on Bluetooth reports its battery only where Steam or the game has
> switched it to its long report, and an Xbox controller on Bluetooth may report none. **None of this had been
> read from a real controller when it was written (2026-11-14)**: it was checked against data written by hand.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
+5 -4
View File
@@ -1,6 +1,6 @@
# FrameLedger — Privacy Policy
**Version:** 2.21 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.22 · **Effective:** {{RELEASE_DATE}}
**Short version: everything stays on your PC. FrameLedger has no accounts, no telemetry, no analytics, and never uploads your data anywhere.**
@@ -12,6 +12,7 @@ Stored in `%LOCALAPPDATA%\FrameLedger` on your device:
- Images you choose for a game (Edit…), copied into the `covers` folder; choosing the store's image again, or removing the game together with its sessions, deletes the copy. Artwork a store's app keeps on your PC, or a game ships in its own folder, is shown from where it is and not copied.
- Performance sessions: frame timing series, computed statistics, hardware sensor series (temperatures, load, power, memory usage, and the graphics card's clock speeds, fan speed, memory temperature and whether its power limit or heat held it back), the game's own memory use (its dedicated and shared video memory, private working set, working set and commit, once a second), session duration, crash flags, the graphics driver's settings the game ran under (NVIDIA only), how the game's window was shown (full-screen, borderless or windowed, for how long, its size and the monitor's), tags and notes you write.
- **Only while Settings ▸ Advanced metrics is on** (it is off unless you switch it on), with each session: more hardware sensor series — the graphics card's memory use in detail, its load by part, its clocks, voltages, currents, power, each fan and its video encoder's use; and, when the capture agent runs as administrator with PawnIO installed, the processor's temperatures, load, clocks, power and voltages by core, the memory in use and its modules' temperatures, and the motherboard's temperatures, fans and voltages — and a description of the hardware: the graphics card's firmware version, architecture, bus and memory sizes, the graphics driver's package and the chipset it names, the motherboard's and the memory modules' model names, what each connected display can do (the HDR formats it accepts, its brightness range, variable refresh), whether variable refresh was in use on the display the game ran on and the colour space the game presented in, and the graphics driver's settings — its global ones and the ones it holds for the game (NVIDIA only). For a game FrameLedger injects into, a session then also stores what the game itself passed to its upscaler in the calls FrameLedger intercepts: the output size, the model presets and the exposure values it gave DLSS, whether it said its colour buffers are HDR, auto-exposure and alpha upscaling; and the sharpening, the size of the jitter, the exposure, the depth range, the lowest and highest field of view and the flags it gave FSR, the frame time it reported to FSR, and FSR's own video memory when the game asked for it; what the game told NVIDIA Streamline about each frame — the size of the jitter, the motion-vector scale, the depth range and whether depth is inverted, the lowest and highest field of view, the aspect ratio, whether the projection is orthographic, how its motion vectors are stored and how often it reset the upscaler's history; and how it configured FSR frame generation — on or off, whether it may run asynchronously, its flags, whether only generated frames are presented, and the rectangle it generates in; and what NVIDIA Streamline answered when the game asked it about a feature — which features the game asked about, the version of each and of its NGX model, and what each requires: the graphics APIs it supports, whether V-Sync must be off and hardware-accelerated GPU scheduling on, how many processor threads, viewports and buffers, and the versions of Windows and of the graphics driver that Streamline found beside the ones the feature needs ; and, for each Streamline feature the game asks about or controls: whether Streamline answers that it is supported, whether it is loaded, whether the game switched it on or off while it ran, and how many times its resources were allocated and freed; and whether the game shut Streamline down, and how many times — never the lists Streamline's answer points to (the buffers' names, the names of Vulkan extensions and features), never what identifies the graphics card that the game hands over with its question, never the content of a graphics resource, and never where the game's camera is, which way it looks, or its matrices. For a Direct3D 12 game that had itself loaded NVIDIA's driver library, a session also stores what the graphics driver reports about the game's frames when FrameLedger asks it, about once a second, from inside the game: how long each stage of a frame took — simulation, render submit, present, the driver, the operating system's queue and the graphics card, and the whole from the start of simulation to the end of the graphics card's work — as averages in microseconds, with two figures the driver works out itself (how long the graphics card was actually at work on a frame, and the time from the end of one frame's work to the end of the next), and the driver's low-latency state (five switches it reports, and the frame-generation multipliers it gave during the session) — never a time of day, and never the moment the player pressed anything. No serial number, no display identification data (EDID) and no list of other programs is read or stored. Switching the option off stops the reading, inside a game as well; what earlier sessions stored stays with them until you delete those sessions.
- **Unless you switch Settings ▸ Controllers and input off** — and it reads nothing until you have accepted this version of this document — with each session: which game controllers were connected (the model's name, its maker and how it was connected: USB, Bluetooth or a wireless adapter), how many times each connected and disconnected, its battery level when the controller reports one, and, for each second the game was in front, whether a controller was in use, whether the keyboard or mouse was in use, both, or neither. Never which button, stick, trigger or key, never text, never where the mouse is, and never a serial number or a Bluetooth address. Switching the option off stops the reading; what earlier sessions stored stays with them until you delete those sessions.
- A hardware snapshot per session (CPU/GPU model, driver version, RAM size, OS build, display mode) used for the "what changed between sessions" feature.
- App settings, logs (rotated daily — the app keeps 7 days, the capture agent 14 — including the logs written by the component loaded into games), and, after a crash of the app itself, crash dump files.
- Which games you enabled code injection for, and when you consented.
@@ -39,13 +40,13 @@ The "Report a bug" feature builds a zip file **on your device**, shows you exact
## 3A. Sharing an export or a bug report
An exported session (CSV or JSON) and a bug report can contain your games' names and **the paths to their files** — which include your **Windows user name** when a game is installed under your user folder — your hardware model, graphics driver and Windows build, the times you played, and your tags and notes. What a session stores only while Advanced metrics is on (§1) is in neither: an export and a bug report carry what they carried before. A bug report removes user directory paths from its logs; an export is written as it is. Look at a file before you share it. Once you share it, it is outside FrameLedger: whoever receives it, and the site you post it to, can read it under their own terms.
An exported session (CSV or JSON) and a bug report can contain your games' names and **the paths to their files** — which include your **Windows user name** when a game is installed under your user folder — your hardware model, graphics driver and Windows build, the times you played, and your tags and notes. What a session stores only while Advanced metrics is on (§1) is in neither. What a session stores of controllers and input (§1) is in both: the shares of its time played with a controller and with the keyboard or mouse, and each controller's model name, how it was connected, its battery levels and its connection counts. A bug report removes user directory paths from its logs; an export is written as it is. Look at a file before you share it. Once you share it, it is outside FrameLedger: whoever receives it, and the site you post it to, can read it under their own terms.
## 4. What the app can technically observe
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; whether a game you enabled hooking for runs in an app container, and which of Windows' code-protection settings it runs under (for example, accepting only Microsoft-signed code), read from Windows before any injection; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation) — and, only while Advanced metrics is on, more of the parameters of the upscaling calls, and the parameters of ten further calls it begins to intercept in a game only once a session with that option on has started there (the constants the game gives NVIDIA Streamline for each frame, the game's configuration of FSR frame generation, Streamline's answers to the game's four questions about a feature — which version it is, what it requires, whether it is supported and whether it is loaded — and the game switching a feature on or off, allocating and freeing its resources, and shutting Streamline down), which are then stored with the session (sizes, presets, exposure, sharpening, the jitter's size, the motion-vector scale, the depth range, the range of the field of view, flags, the reported frame time, the upscaler's own memory, how frame generation is configured, the versions and requirements of Streamline's features, whether each is supported and loaded, and how often the game switched it, allocated and freed its resources and shut Streamline down), never the camera's position, direction or matrices, and never what identifies the graphics card; and — only while Advanced metrics is on, only in a Direct3D 12 game that had itself loaded NVIDIA's driver library — the graphics driver's own report of the game's last frames and its low-latency state, which the component asks that driver for itself about once a second (it makes that call; the game does not), keeping only how long each stage took; the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured, the version information of its upscaling, frame-generation and neural-rendering libraries, and whether each was loaded from the game's folder or from the graphics driver's own copy (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling and neural-rendering libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) and, for a game the Xbox app or the Microsoft Store installed, the package files in its install folder that describe it (`MicrosoftGame.config` and `appxmanifest.xml`) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed, the folders the Xbox app installs games into on each drive (named by the `.GamingRoot` file at the drive's root) with each game's package files, and Windows' answer to whether that game's package is installed for you — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app — Steam's and GOG GALAXY's also when you open a game's page, to find the artwork their apps keep for it; the cover and banner images that the Steam and GOG GALAXY apps keep on your disk for a game in your library and the logo and splash-screen images a game from the Xbox app ships in its own folder — read to show them on its page, never copied or sent anywhere; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; and — only while Advanced metrics is on — that driver's description of the graphLine truncated
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; whether a game you enabled hooking for runs in an app container, and which of Windows' code-protection settings it runs under (for example, accepting only Microsoft-signed code), read from Windows before any injection; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation) — and, only while Advanced metrics is on, more of the parameters of the upscaling calls, and the parameters of ten further calls it begins to intercept in a game only once a session with that option on has started there (the constants the game gives NVIDIA Streamline for each frame, the game's configuration of FSR frame generation, Streamline's answers to the game's four questions about a feature — which version it is, what it requires, whether it is supported and whether it is loaded — and the game switching a feature on or off, allocating and freeing its resources, and shutting Streamline down), which are then stored with the session (sizes, presets, exposure, sharpening, the jitter's size, the motion-vector scale, the depth range, the range of the field of view, flags, the reported frame time, the upscaler's own memory, how frame generation is configured, the versions and requirements of Streamline's features, whether each is supported and loaded, and how often the game switched it, allocated and freed its resources and shut Streamline down), never the camera's position, direction or matrices, and never what identifies the graphics card; and — only while Advanced metrics is on, only in a Direct3D 12 game that had itself loaded NVIDIA's driver library — the graphics driver's own report of the game's last frames and its low-latency state, which the component asks that driver for itself about once a second (it makes that call; the game does not), keeping only how long each stage took; the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured, the version information of its upscaling, frame-generation and neural-rendering libraries, and whether each was loaded from the game's folder or from the graphics driver's own copy (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling and neural-rendering libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) and, for a game the Xbox app or the Microsoft Store installed, the package files in its install folder that describe it (`MicrosoftGame.config` and `appxmanifest.xml`) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed, the folders the Xbox app installs games into on each drive (named by the `.GamingRoot` file at the drive's root) with each game's package files, and Windows' answer to whether that game's package is installed for you — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app — Steam's and GOG GALAXY's also when you open a game's page, to find the artwork their apps keep for it; the cover and banner images that the Steam and GOG GALAXY apps keep on your disk for a game in your library and the logo and splash-screen images a game from the Xbox app ships in its own folder — read to show them on its page, never copied or sent anywhere; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; and — only while Advanced metrics is on — that driver's description of the graphLine truncated
It does **not** read game memory outside those API parameters, and does not read game saves, chat, input content, network traffic, or anything unrelated to performance measurement. It records only for programs you added to your library and did not switch recording off for — a program whose recording is off is not watched at all — and injects only into games you individually enabled.
It does **not** read game memory outside those API parameters, and does not read game saves, chat, what you type or which buttons you press — only that a controller, or the keyboard or mouse, was in use (§1) — network traffic, or anything unrelated to performance measurement. It records only for programs you added to your library and did not switch recording off for — a program whose recording is off is not watched at all — and injects only into games you individually enabled.
All of this stays on your device. None of it is transmitted anywhere.
+2 -1
View File
@@ -12,7 +12,8 @@ Microsoft Corporation. NVIDIA, GeForce, RTX, DLSS,
Reflex, NVAPI and Streamline are trademarks of NVIDIA Corporation. AMD, Radeon, FSR and FidelityFX are trademarks of
Advanced Micro Devices, Inc. Intel, Arc and XeSS are trademarks of Intel Corporation. Vulkan is a registered trademark
of the Khronos Group Inc.; OpenGL is a registered trademark of Hewlett Packard Enterprise, used under licence by the
Khronos Group. Steam and Valve are trademarks of Valve Corporation; Epic Games, the Epic Games Store and Unreal Engine of
Khronos Group. PlayStation, DualSense and DualShock are trademarks of Sony Interactive Entertainment Inc.; Nintendo Switch is a
trademark of Nintendo. Steam and Valve are trademarks of Valve Corporation; Epic Games, the Epic Games Store and Unreal Engine of
Epic Games, Inc.; Unity of Unity Technologies. GOG, GOG Galaxy and itch.io are trademarks of their respective owners. The
names of anti-cheat and anti-tamper products, and the names and store identifiers of games, belong to their respective
owners. All other product names are trademarks of their respective owners.
@@ -5,6 +5,7 @@ using FrameLedger.Application.Advanced;
using FrameLedger.Application.AntiCheat;
using FrameLedger.Application.Capture;
using FrameLedger.Application.Consent;
using FrameLedger.Application.Input;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Infrastructure.Display;
@@ -45,6 +46,7 @@ internal sealed class AgentRecording
private readonly UserModeExceptionLapsePolicy _exceptionLapse;
private readonly ICrashReporterSightings _reporters;
private readonly IAdvancedHardware _advanced;
private readonly IInputDevices _input;
public AgentRecording(
IGameConsentStore store,
@@ -70,9 +72,11 @@ internal sealed class AgentRecording
IOverlayToleranceChannel tolerance,
UserModeExceptionLapsePolicy exceptionLapse,
ICrashReporterSightings reporters,
IAdvancedHardware advanced)
IAdvancedHardware advanced,
IInputDevices input)
{
_advanced = advanced;
_input = input;
_reporters = reporters;
_profiles = profiles;
_exceptions = exceptions;
@@ -123,7 +127,7 @@ internal sealed class AgentRecording
_partials,
_finalizer,
_crashes,
options => Poller(options.TelemetryInterval, options.AdvancedMetrics ? _advanced : null),
options => Poller(options.TelemetryInterval, options.AdvancedMetrics ? _advanced : null, options.InputDevices ? _input : null),
TimeProvider.System,
new RecorderOptions { MinimumSessionLength = minimum, PartialFlushInterval = flush },
_observer,
@@ -137,7 +141,8 @@ internal sealed class AgentRecording
/// <summary>L1 + L2 + L3 under the composite, one poller per session; the poller owns and disposes the layers. The interval is the session's (<c>telemetry.interval_ms</c>, D16).</summary>
/// <param name="interval">Between two polls.</param>
/// <param name="advanced">The Agent's shared advanced reader when the session records Advanced metrics (D101); null — the option off — composes none.</param>
public static TelemetryPoller Poller(TimeSpan interval, IAdvancedHardware? advanced = null)
/// <param name="input">The Agent's one input reader when the session reads controllers and input (D155, D156); null - the option off, or its terms not accepted - opens none.</param>
public static TelemetryPoller Poller(TimeSpan interval, IAdvancedHardware? advanced = null, IInputDevices? input = null)
{
// Ownership walks up one step at a time and each local is nulled at its hand-off, so a throw
// anywhere below disposes exactly what nobody owns yet.
@@ -168,7 +173,7 @@ internal sealed class AgentRecording
// The game process's own memory (beta.12, D43): read from outside it through FrameLedger.ProcessStats.dll, for
// whichever process the capture loop tells the poller to follow. Absent DLL = N/A, never a fault.
game = new GameMemoryReader(new NativeProcessStats());
var poller = new TelemetryPoller(composite, new TelemetryPollerOptions { Interval = interval }, TimeProvider.System, ownsSource: true, system, game, advanced);
var poller = new TelemetryPoller(composite, new TelemetryPollerOptions { Interval = interval }, TimeProvider.System, ownsSource: true, system, game, advanced, input);
composite = null;
system = null;
game = null;
@@ -7,6 +7,7 @@ using FrameLedger.Application.AntiCheat;
using FrameLedger.Application.Capture;
using FrameLedger.Application.Consent;
using FrameLedger.Application.Detection;
using FrameLedger.Application.Input;
using FrameLedger.Application.Ipc;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
@@ -19,6 +20,7 @@ using FrameLedger.Infrastructure.Blobs;
using FrameLedger.Infrastructure.Capture;
using FrameLedger.Infrastructure.Detection;
using FrameLedger.Infrastructure.Import;
using FrameLedger.Infrastructure.Input;
using FrameLedger.Infrastructure.Ipc;
using FrameLedger.Infrastructure.Persistence;
using FrameLedger.Infrastructure.Recording;
@@ -72,6 +74,8 @@ internal static class AgentServices
services.AddSingleton<ISettingsStore, SqliteSettingsStore>();
// The registry over the store (P3 PR-3, D16): the recorder resolves its three keys at each session start.
services.AddSingleton<RegisteredSettings>();
// Read by the recorder's policy only: the input reading waits for the Privacy Policy that describes it (D156).
services.AddSingleton<ILegalAcceptanceStore, SqliteLegalAcceptanceStore>();
services.AddSingleton<IRecorderPolicy, SettingsRecorderPolicy>();
services.AddSingleton<SettingsKillSwitch>();
services.AddSingleton<IKillSwitch>(static sp => sp.GetRequiredService<SettingsKillSwitch>());
@@ -93,7 +97,9 @@ internal static class AgentServices
sp.GetRequiredService<LatestProcessSnapshot>()));
services.AddSingleton<ITargetLivenessSource, HeldProcessLivenessSource>();
services.AddSingleton<IRingAttacher>(static _ => new ShmRingAttacher(NativeAntiCheatGuard.BuildId()));
services.AddSingleton<IRuntimeModuleSnapshot>(static _ => new RuntimeModuleSnapshot(CensusNames.ModuleFileNames));
// The input libraries ride the same snapshot (D163): which of them a hooked game had loaded is one of the three
// pieces of evidence for "supports controllers". The App leaves them out of the Libraries line.
services.AddSingleton<IRuntimeModuleSnapshot>(static _ => new RuntimeModuleSnapshot([.. CensusNames.ModuleFileNames, .. Domain.Input.InputLibraries.FileNames]));
AddNvidia(services);
AddRecording(services, paths);
@@ -130,6 +136,18 @@ internal static class AgentServices
interval: TimeSpan.FromSeconds(1),
linger: TimeSpan.FromSeconds(10),
static line => Serilog.Log.Information("{Line}", line)));
// Controllers and input (owner decisions D155-D159): ONE reader for the whole Agent, on a thread of its own, that
// exists only while a session has a view of it - a session recorded with the option on, after the terms that
// describe the reading were accepted (D156). Constructing it opens nothing: with no session there is no thread,
// no window and no registration. It is paused with the recording. The container disposes it with the host.
services.AddSingleton<IInputDevices>(static sp =>
{
CapturePause pause = sp.GetRequiredService<CapturePause>();
return new InputDeviceHub(
static () => new Win32InputBackend(),
paused: () => pause.IsPaused,
note: static line => Serilog.Log.Information("{Line}", line));
});
services.AddSingleton<AgentRecording>();
}
+5
View File
@@ -512,6 +512,11 @@ public partial class App : System.Windows.Application
services.AddSingleton<Application.Art.IStoreArtCache>(static _ => new GogArtCache());
services.AddSingleton<Application.Art.IStoreArtCache>(static _ => new XboxArtCache());
services.AddSingleton(static sp => new StoreRecordsReader(sp.GetServices<IStoreLibrarySource>()));
// D163: what the Steam app's own file on this PC lists of controller support, read when a game's page opens.
services.AddSingleton(static sp => new StoreControllerSupport(
sp.GetRequiredService<StoreRecordsReader>(),
sp.GetRequiredService<IGameRepository>(),
sp.GetRequiredService<UiMode>()));
services.AddSingleton(static sp => new GameArt(
sp.GetRequiredService<RegisteredSettings>(),
sp.GetRequiredService<StoreRecordsReader>(),
@@ -113,6 +113,21 @@ public sealed record ChartPalette(
_ => throw new ArgumentOutOfRangeException(nameof(key), key, "not a chart palette key"),
};
/// <summary>
/// The colour of what a session was played with (0.1.0-beta.50): a controller the first series colour, the keyboard or
/// mouse the second, both at once the sensors' green, no input the mix's grey - roles the palette already has, so the
/// contrast table of <c>08_UI</c> §Accessibility covers them. Under a Windows contrast theme two of the four share a
/// colour (the theme has few): the bar draws them apart with a gap and never next to each other, the charts give each
/// its own row or marker, and every number is in the table in text.
/// </summary>
public Color InputFill(Domain.Input.InputClass input) => input switch
{
Domain.Input.InputClass.Controller => Native,
Domain.Input.InputClass.KeyboardMouse => Displayed,
Domain.Input.InputClass.Both => Sensor,
_ => MixNone,
};
/// <summary>
/// The fill of a frame-generation mix segment (beta.24, D62): a state by its multiplier, so ×4 reads the same colour in
/// every session — the series colours, never the stutter reds —, and no frame generation and the time no state claims
@@ -24,6 +24,8 @@ public partial class FrametimeChart : UserControl
private SessionSeries? _series;
private bool _displayed;
private bool _sensors;
private IReadOnlyList<InputEvent> _inputEvents = [];
private bool _showInputEvents;
public FrametimeChart()
{
@@ -60,12 +62,32 @@ public partial class FrametimeChart : UserControl
Redraw();
}
/// <summary>
/// The session's controller marks (0.1.0-beta.50): a connection, a drop, a battery that fell to low, as lines across
/// the frames - drawn only where the frames' place on the sensors' clock is known, as the sensor overlay is.
/// </summary>
public void SetInputEvents(IReadOnlyList<InputEvent> events, bool show)
{
ArgumentNullException.ThrowIfNull(events);
if (ReferenceEquals(_inputEvents, events) && _showInputEvents == show)
{
return; // the same marks, shown the same way: a second draw of every frame would say nothing new
}
_inputEvents = events;
_showInputEvents = show;
Redraw();
}
/// <summary>The controller marks the last draw put on the axes.</summary>
public int DrawnInputEvents { get; private set; }
/// <summary>
/// What the lines are not, when that is not obvious (beta.8): a session whose presents were all generated is charted as
/// presents; every present is timed at submission, which is not the display's cadence; and the overlay's sensors run ahead
/// of the frames past every gap the time axis closes up.
/// </summary>
internal static string NoteFor(SessionSeries? series, bool displayed, bool sensors)
internal static string NoteFor(SessionSeries? series, bool displayed, bool sensors, bool marks = false)
{
if (series is null || series.Presents == 0)
{
@@ -87,6 +109,11 @@ public partial class FrametimeChart : UserControl
{
lines.Add(string.Format(CultureInfo.CurrentCulture, Strings.Chart_Note_GapsClosed_Format, gaps));
}
else if (marks && series.SensorsAligned && gaps > 0)
{
// The marks are on the same clock as the sensors: past a gap the axis closed up, they run ahead of the frames too.
lines.Add(string.Format(CultureInfo.CurrentCulture, Strings.Chart_Note_GapsClosed_Marks_Format, gaps));
}
return string.Join(Environment.NewLine, lines);
}
@@ -96,10 +123,12 @@ public partial class FrametimeChart : UserControl
Plot plot = Plot.Plot;
plot.Clear();
DrawnPoints = 0;
DrawnInputEvents = 0;
ChartTheme.Apply(plot);
plot.XLabel(Strings.Chart_Axis_Time);
plot.YLabel(Strings.Chart_Axis_Frametime);
Note.Text = NoteFor(_series, _displayed, _sensors);
bool marks = _showInputEvents && _series?.SensorOffsetS is { } first && _inputEvents.Any(e => e.TimeS >= first && e.TimeS - first <= _series.DurationS);
Note.Text = NoteFor(_series, _displayed, _sensors, marks);
Note.Visibility = Note.Text.Length > 0 ? Visibility.Visible : Visibility.Collapsed;
if (_series is null || _series.Presents == 0)
{
@@ -123,6 +152,12 @@ public partial class FrametimeChart : UserControl
}
plot.Axes.AutoScale();
if (marks)
{
// After the scale: a line across the whole height must not be what the axes are fitted to.
DrawnInputEvents = InputEventLines.Draw(plot, _inputEvents, p, _series.SensorOffsetS!.Value, _series.DurationS);
}
LabelSegments(plot, p);
plot.ShowLegend(Alignment.UpperRight);
Plot.Refresh();
@@ -0,0 +1,17 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<UserControl x:Class="FrameLedger.App.Charts.InputBatteryChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:res="clr-namespace:FrameLedger.App"
xmlns:charts="clr-namespace:FrameLedger.App.Charts">
<!-- 08_UI §Session summary (0.1.0-beta.50): each controller's battery over the session, as steps; a line saying none was
read where no controller reported one. -->
<Grid>
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_InputBattery}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Input}" />
<ui:TextBlock x:Name="NotRead" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{x:Static res:Strings.Chart_InputBattery_NotRead}" Visibility="Collapsed" />
</Grid>
</UserControl>
@@ -0,0 +1,83 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using System.Windows.Controls;
using FrameLedger.Application.Input;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Input;
using ScottPlot;
using ScottPlot.Plottables;
namespace FrameLedger.App.Charts;
/// <summary>
/// Each controller's battery over a session (0.1.0-beta.50; <see cref="InputSeries"/>): a step line a controller - a
/// level holds until the next reading - on one axis of per cent. A controller that reports four levels (XInput's empty,
/// low, medium, full) is drawn at thirds and its legend says so: it is a coarser scale, not a measured percentage.
/// </summary>
public partial class InputBatteryChart : UserControl
{
public InputBatteryChart()
{
InitializeComponent();
ChartTheme.Attach(Plot);
}
/// <summary>The lines drawn by the last <see cref="Show"/>; 0 when no controller reported a battery.</summary>
public int DrawnLines { get; private set; }
public void Show(InputSeries? series, InputDevicesRecord? record)
{
Plot plot = Plot.Plot;
plot.Clear();
ChartTheme.Apply(plot);
plot.XLabel(Strings.Chart_Axis_TimeFromStart);
plot.YLabel(Strings.Chart_Axis_Battery);
DrawnLines = 0;
if (series is not null)
{
ChartPalette p = ChartTheme.Current;
Color[] colours = [p.Native, p.Displayed, p.Sensor, p.SensorSecondary, p.Percentile, p.SensorTertiary];
foreach (InputDeviceSeries device in series.Devices.Where(static d => d.Battery is not null))
{
BatteryScale scale = InputNames.ScaleOf(record?.Devices.FirstOrDefault(d => d.Index == device.Index)?.Battery?.Scale);
DrawDevice(plot, series, device, scale, colours[DrawnLines % colours.Length]);
}
if (DrawnLines > 0)
{
// The axis runs past 100 so the legend has a place no level can be drawn under.
plot.Axes.Left.SetTicks([0, 25, 50, 75, 100], ["0", "25", "50", "75", "100"]);
plot.Axes.SetLimits(0, Math.Max(series.TimesS[^1], 1), 0, 135);
plot.ShowLegend(Alignment.UpperRight);
}
}
NotRead.Visibility = DrawnLines > 0 ? Visibility.Collapsed : Visibility.Visible;
Plot.Visibility = DrawnLines > 0 ? Visibility.Visible : Visibility.Hidden;
Plot.Refresh();
}
private void DrawDevice(Plot plot, InputSeries series, InputDeviceSeries device, BatteryScale scale, Color colour)
{
float[] battery = device.Battery!;
int[] read = [.. Enumerable.Range(0, battery.Length).Where(i => !float.IsNaN(battery[i]))];
if (read.Length == 0 || scale == BatteryScale.None)
{
return;
}
double[] xs = [.. read.Select(i => series.TimesS[i])];
double[] ys = [.. read.Select(i => InputSeries.ToPercent(battery[i], scale))];
Scatter line = plot.Add.Scatter(xs, ys, colour);
line.ConnectStyle = ConnectStyle.StepHorizontal;
line.MarkerSize = 0;
line.LineWidth = 2;
line.LegendText = scale == BatteryScale.FourLevels
? InputSeries.DeviceLabel(device.Index) + " " + Strings.Chart_Input_FourLevels
: InputSeries.DeviceLabel(device.Index);
ChartPatterns.Line(line, DrawnLines);
DrawnLines++;
}
}
@@ -0,0 +1,11 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>One controller's series of a session (<c>input.dev.N.active</c>, <c>input.dev.N.battery</c>), a value a tick.</summary>
/// <param name="Index">The controller's number in the session, from 1 - <c>sessions.input_devices</c> names it the same.</param>
/// <param name="Active">The part of each tick's time in front the controller was in use (0..1); NaN while it was not connected.</param>
/// <param name="Battery">The battery's level on each tick, in its own scale; NaN where there was none. Null for a controller with no battery series.</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "a data carrier for the charts, as SensorSeries is")]
public sealed record InputDeviceSeries(int Index, float[] Active, float[]? Battery);
+10
View File
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>One mark on a session's charts: what happened to which controller, and when.</summary>
/// <param name="TimeS">Seconds from the session's start (the sensors' clock).</param>
/// <param name="Kind">What happened.</param>
/// <param name="Device">The controller's number in the session, from 1.</param>
public sealed record InputEvent(double TimeS, InputEventKind Kind, int Device);
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Charts;
/// <summary>What happened to a controller at a moment of a session (0.1.0-beta.50): the marks on the session's charts.</summary>
public enum InputEventKind
{
/// <summary>A controller connected after the session's first reading.</summary>
Connected,
/// <summary>A controller dropped.</summary>
Disconnected,
/// <summary>A controller's battery fell to low: XInput's "low" or "empty", or 10 % and under.</summary>
BatteryLow,
}
@@ -0,0 +1,71 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using ScottPlot;
using ScottPlot.Plottables;
namespace FrameLedger.App.Charts;
/// <summary>
/// A session's controller marks as vertical lines on a chart (0.1.0-beta.50): a connection, a drop, a battery that fell
/// to low. Each kind has a line pattern of its own as well as a colour, and one legend entry - nothing is told by colour
/// alone (<c>08_UI</c> §Accessibility).
/// </summary>
public static class InputEventLines
{
/// <summary>
/// Draws the marks that fall on the chart's axis and returns how many it drew.
/// </summary>
/// <param name="plot">The chart.</param>
/// <param name="events">The session's marks, on the sensors' clock.</param>
/// <param name="palette">The theme's colours.</param>
/// <param name="offsetS">Where the chart's zero is on that clock: 0 for a chart from the session's start, the first present's time for one over the frames.</param>
/// <param name="endS">The end of the chart's axis; a mark after it, or before zero, is left out.</param>
public static int Draw(Plot plot, IReadOnlyList<InputEvent> events, ChartPalette palette, double offsetS, double endS)
{
ArgumentNullException.ThrowIfNull(plot);
ArgumentNullException.ThrowIfNull(events);
ArgumentNullException.ThrowIfNull(palette);
var named = new HashSet<InputEventKind>();
int drawn = 0;
foreach (InputEvent mark in events)
{
double x = mark.TimeS - offsetS;
if (x < 0 || x > endS)
{
continue;
}
VerticalLine line = plot.Add.VerticalLine(x);
line.LineWidth = 1;
line.Color = ColorOf(mark.Kind, palette);
line.LinePattern = PatternOf(mark.Kind);
// One legend entry a kind: the first line of each carries it.
line.LegendText = named.Add(mark.Kind) ? InputSeries.Describe(mark.Kind) : string.Empty;
drawn++;
}
return drawn;
}
/// <summary>A kind's colour: series colours, never the stutter reds - a mark is a fact, not a fault.</summary>
public static Color ColorOf(InputEventKind kind, ChartPalette palette)
{
ArgumentNullException.ThrowIfNull(palette);
return kind switch
{
InputEventKind.Connected => palette.Sensor,
InputEventKind.Disconnected => palette.SensorSecondary,
_ => palette.Percentile,
};
}
/// <summary>A kind's line pattern: dashed, dotted, densely dashed - solid is the frames'.</summary>
public static LinePattern PatternOf(InputEventKind kind) => kind switch
{
InputEventKind.Connected => LinePattern.Dashed,
InputEventKind.Disconnected => LinePattern.Dotted,
_ => LinePattern.DenselyDashed,
};
}
+150
View File
@@ -0,0 +1,150 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using FrameLedger.Application.Input;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Input;
using FrameLedger.Infrastructure.Blobs;
namespace FrameLedger.App.Charts;
/// <summary>
/// A session's input series decoded (0.1.0-beta.50, <c>06_DATA_MODEL</c> §sensor_blobs): what each tick was mostly
/// played with and each controller's activity and battery, on the sensors' clock. Unlike the advanced series a gap is
/// kept - NaN is "not connected" for a controller and "not in front" for the class, and where one starts and ends is
/// exactly what the marks are made of.
/// </summary>
/// <param name="TimesS">Seconds from the session's start, a value a tick.</param>
/// <param name="Class"><see cref="InputClass"/>'s number on each tick; NaN with no reading or with the game not in front.</param>
/// <param name="Devices">The controllers that have series, by their number.</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "a data carrier for the charts, as SensorSeries is")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format string is a resource that follows the UI culture, which changes at runtime")]
public sealed record InputSeries(double[] TimesS, float[] Class, IReadOnlyList<InputDeviceSeries> Devices)
{
/// <summary>The most marks one chart draws: a connection that flaps would otherwise bury the chart under its own lines. The table has the counts.</summary>
public const int MaxEvents = 60;
/// <summary>The blobs of <c>FindInputSensorsAsync</c> decoded; null when the session stored no input series.</summary>
public static InputSeries? Decode(IReadOnlyList<SensorBlob> blobs)
{
ArgumentNullException.ThrowIfNull(blobs);
float[]? @class = Values(blobs, InputSessionBuilder.ClassSeries);
if (@class is null)
{
return null;
}
float[]? tMs = Values(blobs, "t_ms");
double hz = blobs.First(static b => string.Equals(b.Series, InputSessionBuilder.ClassSeries, StringComparison.Ordinal)).Hz;
double[] times = new double[@class.Length];
for (int i = 0; i < times.Length; i++)
{
times[i] = tMs is not null && i < tMs.Length ? tMs[i] / 1000.0 : i / Math.Max(hz, 0.001);
}
var devices = new List<InputDeviceSeries>();
for (int index = 1; index <= InputSessionBuilder.MaxDevices; index++)
{
if (Values(blobs, InputSessionBuilder.ActiveSeries(index)) is { } active && active.Length == @class.Length)
{
float[]? battery = Values(blobs, InputSessionBuilder.BatterySeries(index));
devices.Add(new InputDeviceSeries(index, active, battery?.Length == @class.Length ? battery : null));
}
}
return new InputSeries(times, @class, devices);
}
/// <summary>
/// The marks: each controller's connections and drops after the session's first reading, and each fall of a battery to
/// low - in time order, <see cref="MaxEvents"/> at most. A controller that was there from the start did not
/// "connect": where a series has one rising edge more than the row counted connects, the first is the start.
/// </summary>
public IReadOnlyList<InputEvent> Events(InputDevicesRecord? record)
{
var events = new List<InputEvent>();
foreach (InputDeviceSeries device in Devices)
{
InputDeviceRecord? stored = record?.Devices.FirstOrDefault(d => d.Index == device.Index);
AddConnections(events, device, stored?.Connects);
if (device.Battery is { } battery && stored?.Battery is { } facts)
{
AddBatteryLow(events, device.Index, battery, InputNames.ScaleOf(facts.Scale));
}
}
return [.. events.OrderBy(static e => e.TimeS).Take(MaxEvents)];
}
/// <summary>A kind of mark in a few words - a chart's legend entry.</summary>
public static string Describe(InputEventKind kind) => kind switch
{
InputEventKind.Connected => Strings.Chart_Input_Event_Connected,
InputEventKind.Disconnected => Strings.Chart_Input_Event_Disconnected,
_ => Strings.Chart_Input_Event_BatteryLow,
};
private static float[]? Values(IReadOnlyList<SensorBlob> blobs, string series)
{
SensorBlob? blob = blobs.FirstOrDefault(b => string.Equals(b.Series, series, StringComparison.Ordinal));
return blob is null || !string.Equals(blob.Codec, SeriesCodec.Tag, StringComparison.Ordinal) ? null : SeriesCodec.DecodeFloat32(blob.Data.ToArray());
}
private void AddConnections(List<InputEvent> events, InputDeviceSeries device, int? countedConnects)
{
var rising = new List<int>();
bool connected = false;
for (int i = 0; i < device.Active.Length; i++)
{
bool now = !float.IsNaN(device.Active[i]);
if (now && !connected)
{
rising.Add(i);
}
else if (!now && connected)
{
events.Add(new InputEvent(TimesS[i], InputEventKind.Disconnected, device.Index));
}
connected = now;
}
// The row's count is the builder's, taken after the session's first reading: one edge more is the controller
// that was already there. With no stored count, an edge on the very first tick is read the same way.
int skip = countedConnects is { } counted ? Math.Max(0, rising.Count - counted) : rising is [0, ..] ? 1 : 0;
events.AddRange(rising.Skip(skip).Select(i => new InputEvent(TimesS[i], InputEventKind.Connected, device.Index)));
}
private void AddBatteryLow(List<InputEvent> events, int index, float[] battery, BatteryScale scale)
{
// A falling level is a battery running down: the state is not in the series, and a level that falls is not charging.
float? previous = null;
for (int i = 0; i < battery.Length; i++)
{
if (float.IsNaN(battery[i]))
{
continue;
}
if (previous is { } before && !IsLow(before, scale) && IsLow(battery[i], scale))
{
events.Add(new InputEvent(TimesS[i], InputEventKind.BatteryLow, index));
}
previous = battery[i];
}
}
private static bool IsLow(float level, BatteryScale scale) =>
new BatteryReading(BatteryState.Discharging, scale, (int)Math.Round(level, MidpointRounding.AwayFromZero)).IsLow;
/// <summary>The battery series as a percentage to draw: a percentage as it is, XInput's four levels as thirds (empty 0, low 33, medium 67, full 100).</summary>
public static double ToPercent(float level, BatteryScale scale) => scale == BatteryScale.FourLevels
? Math.Round(Math.Clamp(level, 0f, 3f) * 100.0 / 3.0, MidpointRounding.AwayFromZero)
: Math.Clamp(level, 0f, 100f);
/// <summary>The label of a controller's line: its number, as the table's order has it.</summary>
public static string DeviceLabel(int index) => string.Format(CultureInfo.CurrentCulture, Strings.Chart_Input_Device_Format, index);
}
@@ -0,0 +1,17 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<UserControl x:Class="FrameLedger.App.Charts.InputTimelineChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:res="clr-namespace:FrameLedger.App"
xmlns:charts="clr-namespace:FrameLedger.App.Charts">
<!-- 08_UI §Session summary (0.1.0-beta.50): what each second of the session was played with, one row a class - the row
names the class, the marker's shape differs too - and the controllers' connections, drops and low batteries as lines. -->
<Grid>
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_InputTimeline}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Input}" />
<ui:TextBlock x:Name="NotRead" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{x:Static res:Strings.Chart_Input_NotStored}" Visibility="Collapsed" />
</Grid>
</UserControl>
@@ -0,0 +1,90 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using System.Windows.Controls;
using FrameLedger.App.Services;
using FrameLedger.Domain.Input;
using ScottPlot;
using ScottPlot.Plottables;
namespace FrameLedger.App.Charts;
/// <summary>
/// What each second of a session was played with (0.1.0-beta.50; <see cref="InputSeries"/>): four rows - no input, a
/// controller, the keyboard and mouse, both at once - a mark on a row for every second the game was in front and mostly
/// played that way, and the controllers' connections, drops and low batteries as lines across them. A second with the
/// game not in front has no mark on any row.
/// </summary>
public partial class InputTimelineChart : UserControl
{
/// <summary>The rows from the bottom: the value a class is stored as is the row it is drawn on.</summary>
private static readonly InputClass[] _rows = [InputClass.None, InputClass.Controller, InputClass.KeyboardMouse, InputClass.Both];
public InputTimelineChart()
{
InitializeComponent();
ChartTheme.Attach(Plot);
}
/// <summary>The marks on the rows drawn by the last <see cref="Show"/>; 0 when the session stored no input series.</summary>
public int DrawnPoints { get; private set; }
/// <summary>The connection, drop and battery lines drawn by the last <see cref="Show"/>.</summary>
public int DrawnEvents { get; private set; }
public void Show(InputSeries? series, IReadOnlyList<InputEvent> events)
{
ArgumentNullException.ThrowIfNull(events);
Plot plot = Plot.Plot;
plot.Clear();
ChartTheme.Apply(plot);
plot.XLabel(Strings.Chart_Axis_TimeFromStart);
DrawnPoints = 0;
DrawnEvents = 0;
if (series is { TimesS.Length: > 0 })
{
ChartPalette p = ChartTheme.Current;
for (int r = 0; r < _rows.Length; r++)
{
DrawRow(plot, series, _rows[r], p, r);
}
double end = series.TimesS[^1];
DrawnEvents = InputEventLines.Draw(plot, events, p, 0, end);
plot.Axes.Left.SetTicks([.. _rows.Select(static c => (double)(int)c)], [.. _rows.Select(InputPresentation.ClassLabel)]);
// A little room on both sides, so the first and the last second are whole marks and not halves on the frame.
double pad = Math.Max(end * 0.01, 0.25);
plot.Axes.SetLimits(-pad, Math.Max(end, 1) + pad, -0.5, _rows.Length - 0.5);
if (DrawnEvents > 0)
{
plot.ShowLegend(Alignment.UpperRight); // the lines' kinds only: the rows are named on the axis
}
}
bool any = DrawnPoints > 0;
NotRead.Visibility = any ? Visibility.Collapsed : Visibility.Visible;
Plot.Visibility = any ? Visibility.Visible : Visibility.Hidden;
Plot.Refresh();
}
private void DrawRow(Plot plot, InputSeries series, InputClass input, ChartPalette palette, int index)
{
int[] ticks = [.. Enumerable.Range(0, series.Class.Length).Where(i => !float.IsNaN(series.Class[i]) && (int)series.Class[i] == (int)input)];
if (ticks.Length == 0)
{
return;
}
DrawnPoints += ticks.Length;
double[] xs = [.. ticks.Select(i => series.TimesS[i])];
double[] ys = [.. ticks.Select(_ => (double)(int)input)];
Scatter row = plot.Add.Scatter(xs, ys, palette.InputFill(input));
row.LineWidth = 0;
row.MarkerSize = 5;
// No legend entry: the axis names the row, and a legend of seven would cover a chart this low.
ChartPatterns.Points(row, index);
}
}
@@ -81,6 +81,12 @@ public sealed record SessionSeries
/// </summary>
public bool SensorsAligned { get; init; }
/// <summary>
/// Where the first present sits on the sensors' clock, in seconds (schema 0013): what turns a time from the session's
/// start - a controller's connection (0.1.0-beta.50) - into a place on the frames' axis. Null where the blob did not say.
/// </summary>
public double? SensorOffsetS { get; init; }
/// <summary>
/// What the charts derive from the whole session, worked out where it was decoded (beta.23); null on a series built by
/// hand, whose charts compute it themselves.
@@ -46,6 +46,14 @@ public sealed class SessionSeriesLoader
public Task<IReadOnlyList<SensorSeries>> LoadAdvancedAsync(long sessionId, CancellationToken ct = default) =>
Task.Run(async () => DecodeAdvanced(await _sessions.FindAdvancedSensorsAsync(sessionId, ct).ConfigureAwait(false)), ct);
/// <summary>
/// The session's input series (0.1.0-beta.50): what each tick was played with and each controller's activity and
/// battery, timed from the session's start, gaps kept. Null for a session that stored none. On the thread pool, as
/// <see cref="LoadAsync"/>.
/// </summary>
public Task<InputSeries?> LoadInputAsync(long sessionId, CancellationToken ct = default) =>
Task.Run(async () => InputSeries.Decode(await _sessions.FindInputSensorsAsync(sessionId, ct).ConfigureAwait(false)), ct);
/// <summary>The advanced blobs decoded: <c>t_ms</c> is their clock, NaN is "no reading".</summary>
public static IReadOnlyList<SensorSeries> DecodeAdvanced(IReadOnlyList<SensorBlob> blobs)
{
@@ -145,6 +153,7 @@ public sealed class SessionSeriesLoader
Segments = MapSegments([.. segments.Where(s => swapchain is null || s.SwapchainId == swapchain.Value)], times, frameIndex),
Sensors = DecodeSensors(sensors, offsetS ?? 0),
SensorsAligned = offsetS is not null,
SensorOffsetS = offsetS,
Digest = SeriesDigest.Of(appFrameTimesMs, times, frametimes, generated, gap, noApplicationFrames),
};
}
@@ -93,4 +93,13 @@ public enum TrendMetric
/// <summary>Application frames per watt of the card's power — never displayed frames (rule 6).</summary>
Efficiency,
/// <summary>
/// The two below are 0.1.0-beta.50's (<c>03_METRICS</c> §Input): the share of the time the game was in front that a
/// controller alone, or the keyboard and mouse alone, was in use - every session whatever its tier, read from outside
/// the game. A session that recorded nothing, or whose game was never in front, has no point.
/// </summary>
ControllerShare,
KeyboardMouseShare,
}
@@ -96,9 +96,12 @@ public static class TrendSeriesBuilder
public static bool Counts(SessionRow row, TrendMetric metric)
{
ArgumentNullException.ThrowIfNull(row);
return row.Tier == CaptureTier.Hooked || IsMachineMetric(metric) || IsDisplayMetric(metric);
return row.Tier == CaptureTier.Hooked || IsMachineMetric(metric) || IsDisplayMetric(metric) || IsInputMetric(metric);
}
/// <summary>The input shares (0.1.0-beta.50): read from outside the game, so every session has them whatever its tier.</summary>
public static bool IsInputMetric(TrendMetric metric) => metric is TrendMetric.ControllerShare or TrendMetric.KeyboardMouseShare;
/// <summary>The display-mode shares (beta.10).</summary>
public static bool IsDisplayMetric(TrendMetric metric) =>
metric is TrendMetric.DisplayExclusiveShare or TrendMetric.DisplayBorderlessShare or TrendMetric.DisplayWindowedShare;
@@ -127,7 +130,8 @@ public static class TrendSeriesBuilder
ArgumentNullException.ThrowIfNull(row);
// A display share is the whole session's by construction (beta.10): switching between fullscreen and a window resizes
// the swap chain, which is exactly what marks a session "settings changed" — the share is what that change was.
if (IsDisplayMetric(metric))
// An input share is the whole session's too (0.1.0-beta.50): what it was played with does not depend on its settings.
if (IsDisplayMetric(metric) || IsInputMetric(metric))
{
return false;
}
@@ -190,6 +194,8 @@ public static class TrendSeriesBuilder
TrendMetric.MaxGpuMemTemp => row.MaxGpuMemTemp,
TrendMetric.PowerLimitShare => row.PowerLimitPct,
TrendMetric.Efficiency => row.AppFramesPerJoule,
TrendMetric.ControllerShare => row.InputSharePercent(row.InputControllerMs),
TrendMetric.KeyboardMouseShare => row.InputSharePercent(row.InputKeyboardMouseMs),
_ => null,
};
+11 -75
View File
@@ -2,8 +2,6 @@
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Media;
using FrameLedger.App.Charts;
namespace FrameLedger.App.Controls;
@@ -11,96 +9,34 @@ namespace FrameLedger.App.Controls;
/// <summary>
/// The frame-generation mix as one bar (beta.24, owner decision D62): each segment a row's share of the session's presenting
/// time, in the chart palette's colours (<see cref="ChartPalette.MixFill"/>). It says nothing the table beside it does not —
/// every number is there, in text — and is announced by its <c>AutomationProperties.Name</c>.
/// every number is there, in text — and is announced by its <c>AutomationProperties.Name</c>. The drawing is
/// <see cref="ShareBar"/>'s.
/// </summary>
/// <remarks>
/// It follows a theme switch the way <see cref="ArtTint"/> does: a resource reference to <c>ApplicationBackgroundColor</c>, whose
/// change redraws it and whose luminance picks the palette — never <c>ApplicationThemeManager.Changed</c>, which only
/// <c>ApplicationThemeManager.Apply</c> raises. No colour is written in XAML (<c>08_UI</c> §Accessibility).
/// </remarks>
public sealed class FgMixBar : FrameworkElement
public sealed class FgMixBar : ShareBar
{
public static readonly DependencyProperty SegmentsProperty = DependencyProperty.Register(
nameof(Segments), typeof(IReadOnlyList<FgMixSegment>), typeof(FgMixBar),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
/// <summary>The space between two segments, so neighbours of near colours — or any two in high contrast — still read as two.</summary>
internal const double Gap = 2;
// The theme, heard through a resource reference (ArtTint's way).
private static readonly DependencyProperty _themeProperty = DependencyProperty.Register(
"Theme", typeof(object), typeof(FgMixBar), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public FgMixBar()
{
SetResourceReference(_themeProperty, "ApplicationBackgroundColor");
SnapsToDevicePixels = true;
}
public IReadOnlyList<FgMixSegment>? Segments
{
get => (IReadOnlyList<FgMixSegment>?)GetValue(SegmentsProperty);
set => SetValue(SegmentsProperty, value);
}
/// <summary>
/// Each segment's rectangle in a bar <paramref name="width"/> by <paramref name="height"/>: widths in proportion to the
/// shares, a <see cref="Gap"/> between two drawn segments; an empty rectangle (zero width) for a share of nothing.
/// </summary>
protected override IReadOnlyList<double> Shares => Segments is { Count: > 0 } segments ? [.. segments.Select(static s => s.Share)] : [];
/// <summary>Each segment's rectangle in a bar <paramref name="width"/> by <paramref name="height"/> (<see cref="ShareBar.Layout"/>).</summary>
internal static IReadOnlyList<Rect> Layout(IReadOnlyList<FgMixSegment> segments, double width, double height)
{
ArgumentNullException.ThrowIfNull(segments);
var rects = new Rect[segments.Count];
double total = segments.Sum(static s => Math.Max(0, s.Share));
if (total <= 0 || width <= 0 || height <= 0)
{
return rects;
}
int drawn = segments.Count(static s => s.Share > 0);
double usable = Math.Max(0, width - (Gap * (drawn - 1)));
double x = 0;
for (int i = 0; i < segments.Count; i++)
{
double w = usable * Math.Max(0, segments[i].Share) / total;
if (w <= 0)
{
continue;
}
rects[i] = new Rect(x, 0, w, height);
x += w + Gap;
}
return rects;
return Layout([.. segments.Select(static s => s.Share)], width, height);
}
/// <summary>The palette for the theme the element's resources hold now; the applied theme's when none is reachable.</summary>
internal ChartPalette Palette() => GetValue(_themeProperty) is Color background ? ChartPalette.ForBackground(background) : ChartTheme.Current;
protected override void OnRender(DrawingContext drawingContext)
protected override ScottPlot.Color Fill(ChartPalette palette, int index)
{
ArgumentNullException.ThrowIfNull(drawingContext);
if (Segments is not { Count: > 0 } segments)
{
return;
}
ChartPalette palette = Palette();
IReadOnlyList<Rect> rects = Layout(segments, ActualWidth, ActualHeight);
for (int i = 0; i < rects.Count; i++)
{
if (rects[i].Width <= 0)
{
continue;
}
ScottPlot.Color fill = palette.MixFill(segments[i].Kind, segments[i].Factor);
var brush = new SolidColorBrush(Color.FromArgb(fill.A, fill.R, fill.G, fill.B));
brush.Freeze();
drawingContext.DrawRoundedRectangle(brush, null, rects[i], 2, 2);
}
ArgumentNullException.ThrowIfNull(palette);
FgMixSegment segment = Segments![index];
return palette.MixFill(segment.Kind, segment.Factor);
}
protected override AutomationPeer OnCreateAutomationPeer() => new FrameworkElementAutomationPeer(this);
}
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using FrameLedger.App.Charts;
namespace FrameLedger.App.Controls;
/// <summary>
/// What a session was played with as one bar (0.1.0-beta.50, <c>08_UI</c> §Session summary): each segment a class's
/// share of the time the game was in front, in the chart palette's colours (<see cref="ChartPalette.InputFill"/>). The
/// table beside it carries every number in text; the drawing is <see cref="ShareBar"/>'s.
/// </summary>
public sealed class InputShareBar : ShareBar
{
public static readonly DependencyProperty SegmentsProperty = DependencyProperty.Register(
nameof(Segments), typeof(IReadOnlyList<InputShareSegment>), typeof(InputShareBar),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public IReadOnlyList<InputShareSegment>? Segments
{
get => (IReadOnlyList<InputShareSegment>?)GetValue(SegmentsProperty);
set => SetValue(SegmentsProperty, value);
}
protected override IReadOnlyList<double> Shares => Segments is { Count: > 0 } segments ? [.. segments.Select(static s => s.Share)] : [];
protected override ScottPlot.Color Fill(ChartPalette palette, int index)
{
ArgumentNullException.ThrowIfNull(palette);
return palette.InputFill(Segments![index].Class);
}
}
@@ -0,0 +1,11 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Domain.Input;
namespace FrameLedger.App.Controls;
/// <summary>One segment of <see cref="InputShareBar"/> (0.1.0-beta.50): what the time was played with, and its share.</summary>
/// <param name="Class">A controller, the keyboard or mouse, both at once, or no input.</param>
/// <param name="Share">Its share of the time the game was in front (0..1); the bar draws the segments in proportion.</param>
public sealed record InputShareSegment(InputClass Class, double Share);
+104
View File
@@ -0,0 +1,104 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Media;
using FrameLedger.App.Charts;
namespace FrameLedger.App.Controls;
/// <summary>
/// Shares of one whole as one bar: each segment as wide as its share, in the chart palette's colours. What
/// <see cref="FgMixBar"/> (beta.24, D62) and <see cref="InputShareBar"/> (0.1.0-beta.50) have in common. A bar says
/// nothing the table beside it does not - every number is there, in text - and is announced by its
/// <c>AutomationProperties.Name</c>.
/// </summary>
/// <remarks>
/// It follows a theme switch the way <see cref="ArtTint"/> does: a resource reference to <c>ApplicationBackgroundColor</c>, whose
/// change redraws it and whose luminance picks the palette — never <c>ApplicationThemeManager.Changed</c>, which only
/// <c>ApplicationThemeManager.Apply</c> raises. No colour is written in XAML (<c>08_UI</c> §Accessibility).
/// </remarks>
public abstract class ShareBar : FrameworkElement
{
/// <summary>The space between two segments, so neighbours of near colours — or any two in high contrast — still read as two.</summary>
internal const double Gap = 2;
// The theme, heard through a resource reference (ArtTint's way).
private static readonly DependencyProperty _themeProperty = DependencyProperty.Register(
"Theme", typeof(object), typeof(ShareBar), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
protected ShareBar()
{
SetResourceReference(_themeProperty, "ApplicationBackgroundColor");
SnapsToDevicePixels = true;
}
/// <summary>The shares to draw, in order; empty when there is nothing to draw.</summary>
protected abstract IReadOnlyList<double> Shares { get; }
/// <summary>The colour of the segment at <paramref name="index"/>.</summary>
protected abstract ScottPlot.Color Fill(ChartPalette palette, int index);
/// <summary>
/// Each share's rectangle in a bar <paramref name="width"/> by <paramref name="height"/>: widths in proportion to the
/// shares, a <see cref="Gap"/> between two drawn segments; an empty rectangle (zero width) for a share of nothing.
/// </summary>
internal static IReadOnlyList<Rect> Layout(IReadOnlyList<double> shares, double width, double height)
{
ArgumentNullException.ThrowIfNull(shares);
var rects = new Rect[shares.Count];
double total = shares.Sum(static s => Math.Max(0, s));
if (total <= 0 || width <= 0 || height <= 0)
{
return rects;
}
int drawn = shares.Count(static s => s > 0);
double usable = Math.Max(0, width - (Gap * (drawn - 1)));
double x = 0;
for (int i = 0; i < shares.Count; i++)
{
double w = usable * Math.Max(0, shares[i]) / total;
if (w <= 0)
{
continue;
}
rects[i] = new Rect(x, 0, w, height);
x += w + Gap;
}
return rects;
}
/// <summary>The palette for the theme the element's resources hold now; the applied theme's when none is reachable.</summary>
internal ChartPalette Palette() => GetValue(_themeProperty) is Color background ? ChartPalette.ForBackground(background) : ChartTheme.Current;
protected override void OnRender(DrawingContext drawingContext)
{
ArgumentNullException.ThrowIfNull(drawingContext);
IReadOnlyList<double> shares = Shares;
if (shares.Count == 0)
{
return;
}
ChartPalette palette = Palette();
IReadOnlyList<Rect> rects = Layout(shares, ActualWidth, ActualHeight);
for (int i = 0; i < rects.Count; i++)
{
if (rects[i].Width <= 0)
{
continue;
}
ScottPlot.Color fill = Fill(palette, i);
var brush = new SolidColorBrush(Color.FromArgb(fill.A, fill.R, fill.G, fill.B));
brush.Freeze();
drawingContext.DrawRoundedRectangle(brush, null, rects[i], 2, 2);
}
}
protected override AutomationPeer OnCreateAutomationPeer() => new FrameworkElementAutomationPeer(this);
}
@@ -227,6 +227,19 @@
IsChecked="{Binding ViewModel.AdvancedMetrics, Mode=TwoWay}"
IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</ui:CardControl>
<!-- Controllers and input (owner decisions D155 and D156, 2026-11-14): on unless switched off, and read only
once the Privacy Policy that describes it has been accepted. The Agent reads it at each session's start. -->
<ui:CardControl Margin="0,8,0,0" Icon="{ui:SymbolIcon XboxController24}">
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Input_Label}" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_Input_Body}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_Input_Label}"
IsChecked="{Binding ViewModel.InputDevices, Mode=TwoWay}"
IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</ui:CardControl>
<!-- beta.12: "Record games launched outside FrameLedger" stood here; nothing read it (capture.background,
06_DATA_MODEL §Settings registry), and with no way to start a game from the App "off" could only have
meant recording nothing. Removed until a launch path exists. -->
@@ -0,0 +1,104 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.Text.Json;
using FrameLedger.Application.Persistence;
using FrameLedger.Domain.Input;
using FrameLedger.Domain.Sessions;
namespace FrameLedger.App.Services;
/// <summary>
/// "Does this game support controllers?" as the game's page answers it (owner decision D163): three pieces of
/// evidence, each with where it comes from, and no verdict. What the store's own file lists; which input libraries the
/// game had loaded when it was last measured from inside; how it has actually been played. From outside a game one
/// can know a controller was in use while the game was in front - not what the game did with it - so none of the
/// three is turned into a Yes or a No of FrameLedger's.
/// </summary>
public static class ControllerEvidence
{
/// <summary>What the store lists: Steam's word, or that no store file on this PC describes the game.</summary>
public static string StoreText(GameRow game)
{
ArgumentNullException.ThrowIfNull(game);
return game.ControllerSupport switch
{
"full" => Strings.GameDetail_Controller_Store_Full,
"partial" => Strings.GameDetail_Controller_Store_Partial,
"none" => Strings.GameDetail_Controller_Store_None,
_ => Strings.GameDetail_Controller_Store_Unknown,
};
}
/// <summary>
/// The input libraries the game had loaded in its newest session measured from inside that looked for them, each
/// interface with its files; that none was seen; or that no such session exists - a session that was not hooked
/// takes no module snapshot, and one recorded before 0.1.0-beta.50 did not look for these.
/// </summary>
public static string LibrariesText(IReadOnlyList<SessionRow> sessions)
{
ArgumentNullException.ThrowIfNull(sessions);
foreach (SessionRow session in sessions)
{
if (session.Tier != CaptureTier.Hooked || Modules(session.RuntimeModulesJson) is not { } modules)
{
continue;
}
// Whether the session looked cannot be read from one that found none of them: a session recorded before the
// names were added has none either. The newest hooked session with modules is the one asked.
string[] found = [.. modules.Keys
.Where(static m => InputLibraries.Is(m))
.GroupBy(static m => InputLibraries.ApiOf(m)!, StringComparer.Ordinal)
.OrderBy(static g => g.Key, StringComparer.Ordinal)
.Select(static g => g.Key + " (" + string.Join(", ", g.OrderBy(static f => f, StringComparer.OrdinalIgnoreCase)) + ")")];
return found.Length > 0 ? string.Join(Environment.NewLine, found) : Strings.GameDetail_Controller_Libraries_NoneSeen;
}
return Strings.GameDetail_Controller_Libraries_Unknown;
}
/// <summary>How the game has been played, over every session that recorded it: each class's share of the time in front, and how many sessions that is.</summary>
public static string PlayedWithText(IReadOnlyList<SessionRow> sessions)
{
ArgumentNullException.ThrowIfNull(sessions);
SessionRow[] recorded = [.. sessions.Where(static s => s.InputForegroundMs is > 0)];
long front = recorded.Sum(static s => s.InputForegroundMs ?? 0);
if (front <= 0)
{
return Strings.GameDetail_Controller_Played_Unknown;
}
return string.Format(
CultureInfo.CurrentCulture,
recorded.Length == 1 ? Strings.GameDetail_Controller_Played_One_Format : Strings.GameDetail_Controller_Played_Many_Format,
Formats.Share(100d * recorded.Sum(static s => s.InputControllerMs ?? 0) / front),
Formats.Share(100d * recorded.Sum(static s => s.InputKeyboardMouseMs ?? 0) / front),
Formats.Share(100d * recorded.Sum(static s => s.InputBothMs ?? 0) / front),
Formats.Share(100d * recorded.Sum(static s => s.InputIdleMs ?? 0) / front),
recorded.Length);
}
/// <summary>Whether a module is one of the input libraries - the session's Libraries line leaves those to this page.</summary>
public static bool IsInputLibrary(string moduleFileName) => InputLibraries.Is(moduleFileName);
private static Dictionary<string, string?>? Modules(string? json)
{
if (string.IsNullOrWhiteSpace(json))
{
return null;
}
try
{
return JsonSerializer.Deserialize(json, AppJsonContext.Default.DictionaryStringString) is { Count: > 0 } modules
? modules.ToDictionary(static m => m.Key, static m => (string?)m.Value, StringComparer.OrdinalIgnoreCase)
: null;
}
catch (JsonException)
{
return null;
}
}
}
@@ -42,6 +42,7 @@ public static class EmbeddedDocuments
"guide/10-glossary.md",
"guide/11-alpha-builds.md",
"guide/12-advanced-metrics.md",
"guide/13-controllers.md",
"guide/terms-in-plain-words.md",
];
+10 -1
View File
@@ -21,9 +21,12 @@ public sealed class GameLibrary
private readonly ISessionRepository _sessions;
private readonly ISessionAnnotationRepository _annotations;
private readonly TimeProvider _clock;
private readonly StoreControllerSupport? _controllers;
public GameLibrary(IGameRepository games, ISessionRepository sessions, ISessionAnnotationRepository annotations, TimeProvider? clock = null)
public GameLibrary(IGameRepository games, ISessionRepository sessions, ISessionAnnotationRepository annotations, TimeProvider? clock = null,
StoreControllerSupport? controllers = null)
{
_controllers = controllers;
_games = games ?? throw new ArgumentNullException(nameof(games));
_sessions = sessions ?? throw new ArgumentNullException(nameof(sessions));
_annotations = annotations ?? throw new ArgumentNullException(nameof(annotations));
@@ -47,6 +50,12 @@ public sealed class GameLibrary
return null;
}
// D163: what the store's own file on this PC lists of controller support, read as the page opens.
if (_controllers is not null)
{
row = await _controllers.RefreshAsync(row, ct).ConfigureAwait(false);
}
IReadOnlyList<SessionRow> sessions = await _sessions.ListByGameAsync(gameId, sessionLimit, ct).ConfigureAwait(false);
IReadOnlyList<SessionAnnotation> annotations = await _annotations.ListByGameAsync(gameId, ct).ConfigureAwait(false);
return new GameDetail(row, sessions, annotations.ToDictionary(static a => a.SessionId));
@@ -0,0 +1,342 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using FrameLedger.App.Controls;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Input;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Input;
namespace FrameLedger.App.Services;
/// <summary>
/// The session summary's "Played with" block (0.1.0-beta.50, owner decisions D155-D163; <c>08_UI</c> §Session summary):
/// the row's stored input totals as a bar and a table, the session's controllers from <c>sessions.input_devices</c>, each
/// maker's share, and why a session has none. Every figure is read from the row - nothing is recomputed from the series.
/// </summary>
/// <remarks>
/// What it can say is what was read from outside the game: a device was in use while the game was in front. Never what
/// the game did with it, never a button, a stick or a key (<c>docs/21_INPUT_DEVICES.md</c>).
/// </remarks>
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public static class InputPresentation
{
private static readonly CultureInfo _inv = CultureInfo.InvariantCulture;
/// <summary>The order of the bar and the table: a controller, the keyboard and mouse, both at once, no input.</summary>
private static readonly InputClass[] _order = [InputClass.Controller, InputClass.KeyboardMouse, InputClass.Both, InputClass.None];
/// <summary>Whether the session has shares to show: something was read while the game was in front.</summary>
public static bool HasShares(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
return row.InputForegroundMs is > 0;
}
/// <summary>The table's four rows, in the bar's order; empty when the session has no share to show.</summary>
public static IReadOnlyList<InputClassRowModel> Rows(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (row.InputForegroundMs is not { } front || front <= 0)
{
return [];
}
return [.. _order.Select(c =>
{
long ms = Milliseconds(row, c);
return new InputClassRowModel(ClassLabel(c), Formats.Share(100d * ms / front), Formats.Duration(ms / 1000d), new InputShareSegment(c, (double)ms / front));
})];
}
/// <summary>A class in the user's words.</summary>
public static string ClassLabel(InputClass input) => input switch
{
InputClass.Controller => Strings.Input_Class_Controller,
InputClass.KeyboardMouse => Strings.Input_Class_KeyboardMouse,
InputClass.Both => Strings.Input_Class_Both,
_ => Strings.Input_Class_None,
};
/// <summary>How long the session was read and how long the game was in front - what the shares are shares of.</summary>
public static string? Context(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
return row is { InputObservedMs: { } observed, InputForegroundMs: { } front }
? string.Format(CultureInfo.CurrentCulture, Strings.Input_Context_Format, Formats.Duration(observed / 1000d), Formats.Duration(front / 1000d))
: null;
}
/// <summary>The bar's spoken name: every row with its share, in the table's order.</summary>
public static string AccessibleName(IReadOnlyList<InputClassRowModel> rows)
{
ArgumentNullException.ThrowIfNull(rows);
return string.Format(CultureInfo.CurrentCulture, Strings.Input_Bar_Name_Format, string.Join(", ", rows.Select(static r => r.Label + " " + r.Share)));
}
/// <summary>How often the session went from a controller to the keyboard and mouse or back; null when nothing was read.</summary>
public static string? Switches(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
return HasShares(row) && row.InputMethodSwitches is { } switches
? string.Format(CultureInfo.CurrentCulture, Strings.Input_Switches_Format, switches)
: null;
}
/// <summary>The session's controllers, in the order they were first seen; empty when none was.</summary>
public static IReadOnlyList<InputControllerRowModel> Controllers(InputDevicesRecord? record) =>
record is null ? [] : [.. record.Devices.Select(Controller)];
/// <summary>One controller as its row.</summary>
public static InputControllerRowModel Controller(InputDeviceRecord device)
{
ArgumentNullException.ThrowIfNull(device);
return new InputControllerRowModel(
ControllerName(device),
ConnectionLabel(InputNames.ConnectionOf(device.Connection)),
Formats.Duration(device.ActiveMs / 1000d),
Formats.Duration(device.ConnectedMs / 1000d),
string.Format(CultureInfo.CurrentCulture, Strings.Input_Events_Format, device.Connects, device.Disconnects),
BatteryText(device.Battery));
}
/// <summary>
/// The model's name where the ledger has one, the maker's otherwise; a pad a program presents, and one a remapper
/// stood in front of, say so - they are what Windows showed, not a second controller in the player's hands.
/// </summary>
public static string ControllerName(InputDeviceRecord device)
{
ArgumentNullException.ThrowIfNull(device);
string name = device.Model is { Length: > 0 } model
? model
: string.Format(CultureInfo.CurrentCulture, Strings.Input_Controller_Unnamed_Format, FamilyLabel(InputNames.FamilyOf(device.Family)));
return device.Virtual
? string.Format(CultureInfo.CurrentCulture, Strings.Input_Controller_Virtual_Format, name)
: device.Remapped ? string.Format(CultureInfo.CurrentCulture, Strings.Input_Controller_Remapped_Format, name) : name;
}
/// <summary>A maker in the user's words.</summary>
public static string FamilyLabel(ControllerFamily family) => family switch
{
ControllerFamily.Xbox => Strings.Input_Family_Xbox,
ControllerFamily.PlayStation => Strings.Input_Family_PlayStation,
ControllerFamily.Nintendo => Strings.Input_Family_Nintendo,
_ => Strings.Input_Family_Other,
};
/// <summary>A connection in the user's words.</summary>
public static string ConnectionLabel(ControllerConnection connection) => connection switch
{
ControllerConnection.Usb => Strings.Input_Connection_Usb,
ControllerConnection.Bluetooth => Strings.Input_Connection_Bluetooth,
ControllerConnection.Wireless => Strings.Input_Connection_Wireless,
_ => Strings.Input_Connection_Unknown,
};
/// <summary>
/// A controller's battery over the session: the state it was read in longest and for how long (the owner's fifth
/// point), then the first and last level and how fast it ran down where those are known. <c>N/A</c> with the reason
/// where no battery was read.
/// </summary>
public static string BatteryText(InputBatteryRecord? battery)
{
if (battery is null || battery.States.Count == 0)
{
return Strings.Input_Battery_NotRead;
}
BatteryScale scale = InputNames.ScaleOf(battery.Scale);
InputBatteryStateRecord longest = battery.States[0];
var parts = new List<string>(3)
{
string.Format(CultureInfo.CurrentCulture, Strings.Input_Battery_Longest_Format, StateText(InputNames.StateOf(longest.State), scale, longest.Level), Formats.Duration(longest.Ms / 1000d)),
};
if (scale != BatteryScale.None && battery is { First: { } first, Last: { } last })
{
parts.Add(string.Format(CultureInfo.CurrentCulture, Strings.Input_Battery_Span_Format, LevelText(scale, first), LevelText(scale, last)));
}
if (battery.DrainPercentPerHour is { } drain)
{
parts.Add(string.Format(CultureInfo.CurrentCulture, Strings.Input_Battery_Drain_Format, drain));
}
return string.Join(" · ", parts);
}
/// <summary>What a battery was doing, with its level where it has one.</summary>
public static string StateText(BatteryState state, BatteryScale scale, int level) => state switch
{
BatteryState.Wired => Strings.Input_Battery_State_Wired,
BatteryState.Full => Strings.Input_Battery_State_Full,
BatteryState.Charging => scale == BatteryScale.None ? Strings.Input_Battery_State_Charging : string.Format(CultureInfo.CurrentCulture, Strings.Input_Battery_State_Charging_Format, LevelText(scale, level)),
BatteryState.Discharging => scale == BatteryScale.None ? Strings.Input_Battery_State_Discharging : string.Format(CultureInfo.CurrentCulture, Strings.Input_Battery_State_Discharging_Format, LevelText(scale, level)),
_ => scale == BatteryScale.None ? Strings.Input_Battery_State_Unknown : LevelText(scale, level),
};
/// <summary>A level in its own scale: a percentage, or XInput's four words.</summary>
public static string LevelText(BatteryScale scale, int level) => scale switch
{
BatteryScale.Percent => level.ToString("0", CultureInfo.CurrentCulture) + "%",
BatteryScale.FourLevels => level switch
{
<= 0 => Strings.Input_Battery_Level_Empty,
1 => Strings.Input_Battery_Level_Low,
2 => Strings.Input_Battery_Level_Medium,
_ => Strings.Input_Battery_Level_Full,
},
_ => Strings.Common_NotAvailable,
};
/// <summary>
/// Each maker's share of the time controllers were in use and how often the maker in use changed (the owner's seventh
/// point); null with fewer than two makers - one maker's share of itself says nothing.
/// </summary>
public static string? Makers(InputDevicesRecord? record)
{
if (record is null || record.Families.Count < 2)
{
return null;
}
string shares = string.Join(" · ", record.Families.Select(static f => FamilyLabel(InputNames.FamilyOf(f.Family)) + " " + Formats.Share(f.Share * 100)));
return string.Format(CultureInfo.CurrentCulture, Strings.Input_Makers_Format, shares, record.FamilySwitches);
}
/// <summary>
/// What the reader could not do in this session and what Windows showed twice, one sentence each: nothing that would
/// leave a figure looking more complete than it is goes unsaid. Empty for a session with nothing to add.
/// </summary>
public static IReadOnlyList<string> Notes(InputDevicesRecord? record)
{
var notes = new List<string>();
if (record is null)
{
return notes;
}
if (record.VirtualPad || record.Devices.Any(static d => d.Remapped))
{
notes.Add(Strings.Input_Note_VirtualPad);
}
InputHealth health = record.Health;
if (!health.RawInputRegistered)
{
notes.Add(Strings.Input_Note_NoRawInput);
}
if (!health.XInputAvailable)
{
notes.Add(Strings.Input_Note_NoXInput);
}
if (!health.LastInputAvailable)
{
notes.Add(Strings.Input_Note_NoLastInput);
}
if (health.Faults > 0)
{
notes.Add(string.Format(CultureInfo.CurrentCulture, Strings.Input_Note_Faults_Format, health.Faults));
}
return notes;
}
/// <summary>
/// Why a session shows no "Played with": the terms that describe the reading were not accepted yet, the game was
/// never in front, or nothing was recorded - the option was off, or the session is older than it. Null when the
/// block is shown.
/// </summary>
public static string? Missing(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (HasShares(row))
{
return null;
}
if (CaptureNotes.Parse(row.CaptureNotes).InputHeldForTerms)
{
return Strings.Input_Missing_Terms;
}
return row.InputObservedMs is > 0 ? Strings.Input_Missing_NeverInFront : Strings.Input_Missing_NotRecorded;
}
/// <summary>The four shares in one line - Compare's cell; <c>N/A</c> for a session with none.</summary>
public static string SharesText(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
return HasShares(row)
? string.Format(
CultureInfo.CurrentCulture,
Strings.Input_Shares_Format,
Formats.Share(row.InputSharePercent(row.InputControllerMs)),
Formats.Share(row.InputSharePercent(row.InputKeyboardMouseMs)),
Formats.Share(row.InputSharePercent(row.InputBothMs)),
Formats.Share(row.InputSharePercent(row.InputIdleMs)))
: Strings.Common_NotAvailable;
}
/// <summary>The session's controllers by name in one line - Compare's cell; <c>N/A</c> where nothing was read, "none" where none was seen.</summary>
public static string ControllersText(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (row.InputObservedMs is not > 0)
{
return Strings.Common_NotAvailable;
}
InputDevicesRecord? record = InputDevicesRecord.Parse(row.InputDevicesJson);
return record is { Devices.Count: > 0 }
? string.Join(" · ", record.Devices.Select(static d => ControllerName(d) + " (" + ConnectionLabel(InputNames.ConnectionOf(d.Connection)) + ")"))
: Strings.Input_Controllers_None;
}
/// <summary>
/// The CSV header's line (<c>03_METRICS</c> §Export schema), InvariantCulture: the milliseconds read, in front and in
/// each class, the method switches, the sources, then each controller - its maker, model, connection, the time in
/// use and connected, its connects and disconnects. <c>N/A</c> for a session with nothing read. What the export
/// carries is what Privacy Policy §3A says it carries.
/// </summary>
public static string ExportLine(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (row.InputObservedMs is not { } observed)
{
return "N/A";
}
string totals = "observed_ms " + observed.ToString(_inv)
+ "; foreground_ms " + (row.InputForegroundMs ?? 0).ToString(_inv)
+ "; controller_ms " + (row.InputControllerMs ?? 0).ToString(_inv)
+ "; keyboard_mouse_ms " + (row.InputKeyboardMouseMs ?? 0).ToString(_inv)
+ "; both_ms " + (row.InputBothMs ?? 0).ToString(_inv)
+ "; idle_ms " + (row.InputIdleMs ?? 0).ToString(_inv)
+ "; method_switches " + (row.InputMethodSwitches ?? 0).ToString(_inv)
+ "; source " + (row.InputSource ?? "n/a");
InputDevicesRecord? record = InputDevicesRecord.Parse(row.InputDevicesJson);
if (record is null || record.Devices.Count == 0)
{
return totals + "; controllers none";
}
return totals + "; " + string.Join("; ", record.Devices.Select(static d =>
"controller " + d.Index.ToString(_inv) + " " + d.Family + " " + (d.Model ?? "unnamed") + " " + d.Connection
+ " active_ms " + d.ActiveMs.ToString(_inv) + " connected_ms " + d.ConnectedMs.ToString(_inv)
+ " connects " + d.Connects.ToString(_inv) + " disconnects " + d.Disconnects.ToString(_inv)));
}
private static long Milliseconds(SessionRow row, InputClass input) => input switch
{
InputClass.Controller => row.InputControllerMs ?? 0,
InputClass.KeyboardMouse => row.InputKeyboardMouseMs ?? 0,
InputClass.Both => row.InputBothMs ?? 0,
_ => row.InputIdleMs ?? 0,
};
}
@@ -102,7 +102,7 @@ public sealed class SessionExporter
w.WriteLine("# exe: " + game.Fingerprint.ExePath);
w.WriteLine("# started_at: " + row.StartedAt.ToString("O", _inv));
w.WriteLine("# ended_at: " + row.EndedAt.ToString("O", _inv));
w.WriteLine("# capture_tier: " + ((int)row.Tier).ToString(_inv) + (row.Tier == CaptureTier.Hooked ? " (hooked, measured)" : " (not hooked: duration and sensors only; no per-frame rows)"));
w.WriteLine("# capture_tier: " + ((int)row.Tier).ToString(_inv) + (row.Tier == CaptureTier.Hooked ? " (hooked, measured)" : " (not hooked: duration, sensors and what is read from outside the game; no per-frame rows)"));
if (row.AcExceptionFamily is { Length: > 0 } excepted)
{
// D33: a session hooked under the game's user-mode anti-cheat exception says so wherever it goes (the JSON carries
@@ -117,6 +117,10 @@ public sealed class SessionExporter
// beta.12 (D43, 03_METRICS §Game process memory): the game's own memory, both tiers, MiB — a header line for the same
// reason as the display: it is the session's, read once a second, not a frame's.
w.WriteLine("# game_memory: " + GameMemoryText.ExportLine(row));
// 0.1.0-beta.50 (D160, 03_METRICS §Input): what the session was played with and its controllers, both tiers - what
// Privacy Policy §3A says an export carries. Never a button, a key, a serial number or an address: the row has none.
w.WriteLine("# input: " + InputPresentation.ExportLine(row));
w.WriteLine("# hardware: " + (hardware is null ? "N/A" : string.Join("; ", new[] { hardware.CpuName, hardware.GpuName, hardware.GpuDriver, hardware.OsBuild, hardware.DisplayRes }.Where(static s => !string.IsNullOrEmpty(s)))));
w.WriteLine("# rt: " + row.RtFlag + " (" + (row.RtSource ?? "n/a") + "); pt: " + row.PtFlag + " (" + (row.PtSource ?? "n/a") + "); rr: " + row.RrFlag + " (" + (row.RrSource ?? "n/a") + ")");
// beta.24 (D63): the session's quality mode and whose it is: the NVIDIA App's override the driver reported applied
@@ -0,0 +1,96 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using FrameLedger.Application.Import;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Play;
using FrameLedger.Infrastructure.Import;
using Serilog;
namespace FrameLedger.App.Services;
/// <summary>
/// What the store that installed a game lists of controller support (owner decision D163): read from the Steam app's
/// own file on this PC when a game's page is opened, and written to the game's row when it differs. No request is
/// made to any store (CLAUDE.md rule 8) - a game no store file on this PC describes keeps what it had, which for most
/// is nothing.
/// </summary>
/// <remarks>
/// <para>
/// It is the store's word and one of three pieces of evidence the page shows; it is never FrameLedger's verdict.
/// </para>
/// <para>
/// <b>A viewer reads nothing of this PC</b> (D52): the copy it shows came from another PC, whose stores are not here.
/// It shows what the copy's rows hold.
/// </para>
/// </remarks>
public sealed class StoreControllerSupport
{
private const string _steam = "steam";
private readonly StoreRecordsReader _stores;
private readonly IGameRepository _games;
private readonly UiMode _mode;
private readonly Func<string?> _appInfoFile;
private readonly TimeProvider _clock;
/// <summary>A reader over the stores' records and the Steam app's own file.</summary>
/// <param name="stores">The stores' records of what they installed.</param>
/// <param name="games">Where the fact is written.</param>
/// <param name="mode">A viewer reads nothing of this PC.</param>
/// <param name="appInfoFile">Where Steam's file is; null is where the Steam app on this PC keeps it.</param>
/// <param name="clock">When the fact was read.</param>
public StoreControllerSupport(StoreRecordsReader stores, IGameRepository games, UiMode mode, Func<string?>? appInfoFile = null, TimeProvider? clock = null)
{
_stores = stores ?? throw new ArgumentNullException(nameof(stores));
_games = games ?? throw new ArgumentNullException(nameof(games));
_mode = mode ?? throw new ArgumentNullException(nameof(mode));
_appInfoFile = appInfoFile ?? SteamAppInfo.InstalledFile;
_clock = clock ?? TimeProvider.System;
}
/// <summary>The game's row with the store's word as it stands now: the row given when nothing could be read or nothing changed.</summary>
public async Task<GameRow> RefreshAsync(GameRow game, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(game);
if (_mode.IsViewer)
{
return game;
}
try
{
IReadOnlyList<StoreGame> records = await _stores.ReadAsync("controller support", [_steam], ct).ConfigureAwait(false);
if (StoreRecords.Owning(game.Fingerprint.ExePath, game.StoreId, records) is not { Platform: _steam } record
|| !uint.TryParse(record.StoreId, NumberStyles.None, CultureInfo.InvariantCulture, out uint appId)
|| _appInfoFile() is not { } file)
{
return game;
}
SteamAppInfoResult read = await Task.Run(() => SteamAppInfo.ReadControllerSupport(file, [appId]), ct).ConfigureAwait(false);
if (read.Problem is { } problem)
{
Log.Information("controller support: Steam's file was not read ({Problem})", problem);
return game;
}
if (!read.Support.TryGetValue(appId, out string? support) || string.Equals(support, game.ControllerSupport, StringComparison.Ordinal))
{
return game;
}
DateTimeOffset now = _clock.GetUtcNow();
return await _games.SetControllerSupportAsync(game.Id, support, SteamAppInfo.Source, now, ct).ConfigureAwait(false)
? game with { ControllerSupport = support, ControllerSupportSource = SteamAppInfo.Source, ControllerSupportAt = now }
: game;
}
catch (Exception e) when (e is not OperationCanceledException and not OutOfMemoryException)
{
// The page opens without it: a store's file is never a reason for a game's page to fail.
Log.Warning("controller support: {Message}", e.Message);
return game;
}
}
}
+267
View File
@@ -40,6 +40,8 @@ public static class Strings
nameof(A11y_Chart_ControlType),
nameof(A11y_Chart_Frametime),
nameof(A11y_Chart_Histogram),
nameof(A11y_Chart_InputBattery),
nameof(A11y_Chart_InputTimeline),
nameof(A11y_Chart_Keys),
nameof(A11y_Chart_Latency),
nameof(A11y_Chart_Percentiles),
@@ -50,6 +52,7 @@ public static class Strings
nameof(A11y_Chart_Vram),
nameof(A11y_ChartData_Advanced),
nameof(A11y_ChartData_Compare),
nameof(A11y_ChartData_Input),
nameof(A11y_ChartData_Latency),
nameof(A11y_ChartData_Sessions),
nameof(A11y_ChartData_Summary),
@@ -457,6 +460,7 @@ public static class Strings
nameof(ChangeExe_Done_Format),
nameof(ChangeExe_Taken_Format),
nameof(ChangeExe_Unreadable_Format),
nameof(Chart_Axis_Battery),
nameof(Chart_Axis_Count),
nameof(Chart_Axis_Fps),
nameof(Chart_Axis_Frametime),
@@ -467,7 +471,15 @@ public static class Strings
nameof(Chart_Axis_TimeFromFirstFrame),
nameof(Chart_Axis_TimeFromStart),
nameof(Chart_Decimated_Format),
nameof(Chart_Input_Device_Format),
nameof(Chart_Input_Event_BatteryLow),
nameof(Chart_Input_Event_Connected),
nameof(Chart_Input_Event_Disconnected),
nameof(Chart_Input_FourLevels),
nameof(Chart_Input_NotStored),
nameof(Chart_InputBattery_NotRead),
nameof(Chart_Note_GapsClosed_Format),
nameof(Chart_Note_GapsClosed_Marks_Format),
nameof(Chart_Note_NoApplicationFrames),
nameof(Chart_Note_OutsideRange_Format),
nameof(Chart_Note_PresentsTiming),
@@ -520,6 +532,7 @@ public static class Strings
nameof(Compare_Legend_Format),
nameof(Compare_Metric_AvgCpuLoad),
nameof(Compare_Metric_AvgGpuLoad),
nameof(Compare_Metric_Controllers),
nameof(Compare_Metric_Display),
nameof(Compare_Metric_Displayed),
nameof(Compare_Metric_Duration),
@@ -538,6 +551,7 @@ public static class Strings
nameof(Compare_Metric_Native),
nameof(Compare_Metric_P01Low),
nameof(Compare_Metric_P1Low),
nameof(Compare_Metric_PlayedWith),
nameof(Compare_Metric_PowerLimit),
nameof(Compare_Metric_Presented),
nameof(Compare_Metric_RenderScale),
@@ -851,6 +865,18 @@ public static class Strings
nameof(GameDetail_AntiCheat_Header),
nameof(GameDetail_Back),
nameof(GameDetail_ChangeExe),
nameof(GameDetail_Controller_Libraries_Label),
nameof(GameDetail_Controller_Libraries_NoneSeen),
nameof(GameDetail_Controller_Libraries_Unknown),
nameof(GameDetail_Controller_Played_Label),
nameof(GameDetail_Controller_Played_Many_Format),
nameof(GameDetail_Controller_Played_One_Format),
nameof(GameDetail_Controller_Played_Unknown),
nameof(GameDetail_Controller_Store_Full),
nameof(GameDetail_Controller_Store_Label),
nameof(GameDetail_Controller_Store_None),
nameof(GameDetail_Controller_Store_Partial),
nameof(GameDetail_Controller_Store_Unknown),
nameof(GameDetail_DeleteSessions),
nameof(GameDetail_Details_Architecture),
nameof(GameDetail_Details_Engine),
@@ -1010,6 +1036,64 @@ public static class Strings
nameof(Import_SelectNone),
nameof(Import_ShowExisting_Format),
nameof(Import_Title),
nameof(Input_Bar_Name_Format),
nameof(Input_Battery_Drain_Format),
nameof(Input_Battery_Header),
nameof(Input_Battery_Level_Empty),
nameof(Input_Battery_Level_Full),
nameof(Input_Battery_Level_Low),
nameof(Input_Battery_Level_Medium),
nameof(Input_Battery_Longest_Format),
nameof(Input_Battery_NotRead),
nameof(Input_Battery_Span_Format),
nameof(Input_Battery_State_Charging),
nameof(Input_Battery_State_Charging_Format),
nameof(Input_Battery_State_Discharging),
nameof(Input_Battery_State_Discharging_Format),
nameof(Input_Battery_State_Full),
nameof(Input_Battery_State_Unknown),
nameof(Input_Battery_State_Wired),
nameof(Input_Class_Both),
nameof(Input_Class_Controller),
nameof(Input_Class_KeyboardMouse),
nameof(Input_Class_None),
nameof(Input_Col_Battery),
nameof(Input_Col_Connected),
nameof(Input_Col_Connection),
nameof(Input_Col_Controller),
nameof(Input_Col_Events),
nameof(Input_Col_InUse),
nameof(Input_Col_Method),
nameof(Input_Connection_Bluetooth),
nameof(Input_Connection_Unknown),
nameof(Input_Connection_Usb),
nameof(Input_Connection_Wireless),
nameof(Input_Context_Format),
nameof(Input_Controller_Remapped_Format),
nameof(Input_Controller_Unnamed_Format),
nameof(Input_Controller_Virtual_Format),
nameof(Input_Controllers_Header),
nameof(Input_Controllers_None),
nameof(Input_Controllers_NoneSeen),
nameof(Input_Events_Format),
nameof(Input_Family_Nintendo),
nameof(Input_Family_Other),
nameof(Input_Family_PlayStation),
nameof(Input_Family_Xbox),
nameof(Input_Header),
nameof(Input_Limits_Note),
nameof(Input_Makers_Format),
nameof(Input_Missing_NeverInFront),
nameof(Input_Missing_NotRecorded),
nameof(Input_Missing_Terms),
nameof(Input_Note_Faults_Format),
nameof(Input_Note_NoLastInput),
nameof(Input_Note_NoRawInput),
nameof(Input_Note_NoXInput),
nameof(Input_Note_VirtualPad),
nameof(Input_Shares_Format),
nameof(Input_Switches_Format),
nameof(Input_Timeline_Header),
nameof(Latency_Avg),
nameof(Latency_Axis),
nameof(Latency_Empty),
@@ -1294,6 +1378,8 @@ public static class Strings
nameof(Settings_HideScrollBars_Label),
nameof(Settings_HookedGames_Label),
nameof(Settings_HookedGames_Revoke),
nameof(Settings_Input_Body),
nameof(Settings_Input_Label),
nameof(Settings_Interval_Body),
nameof(Settings_Interval_Label),
nameof(Settings_Invalid_Format),
@@ -1381,6 +1467,7 @@ public static class Strings
nameof(Summary_Save),
nameof(Summary_Saved),
nameof(Summary_Show_Displayed),
nameof(Summary_Show_InputEvents),
nameof(Summary_Show_Sensors),
nameof(Summary_Stat_Avg),
nameof(Summary_Stat_Below30_Format),
@@ -1486,6 +1573,7 @@ public static class Strings
nameof(Trend_Metric_AvgGpuLoad),
nameof(Trend_Metric_AvgGpuPower),
nameof(Trend_Metric_AvgRam),
nameof(Trend_Metric_ControllerShare),
nameof(Trend_Metric_DisplayBorderless),
nameof(Trend_Metric_Displayed),
nameof(Trend_Metric_DisplayExclusive),
@@ -1498,6 +1586,7 @@ public static class Strings
nameof(Trend_Metric_GameVramMedian),
nameof(Trend_Metric_GameVramPeak),
nameof(Trend_Metric_GpuCoreClock),
nameof(Trend_Metric_KeyboardMouseShare),
nameof(Trend_Metric_Label),
nameof(Trend_Metric_MaxCpuTemp),
nameof(Trend_Metric_MaxGpuMemTemp),
@@ -1584,6 +1673,10 @@ public static class Strings
public static string A11y_Chart_Histogram => ResourceManager.GetString(nameof(A11y_Chart_Histogram), Culture) ?? nameof(A11y_Chart_Histogram);
public static string A11y_Chart_InputBattery => ResourceManager.GetString(nameof(A11y_Chart_InputBattery), Culture) ?? nameof(A11y_Chart_InputBattery);
public static string A11y_Chart_InputTimeline => ResourceManager.GetString(nameof(A11y_Chart_InputTimeline), Culture) ?? nameof(A11y_Chart_InputTimeline);
public static string A11y_Chart_Keys => ResourceManager.GetString(nameof(A11y_Chart_Keys), Culture) ?? nameof(A11y_Chart_Keys);
public static string A11y_Chart_Latency => ResourceManager.GetString(nameof(A11y_Chart_Latency), Culture) ?? nameof(A11y_Chart_Latency);
@@ -1604,6 +1697,8 @@ public static class Strings
public static string A11y_ChartData_Compare => ResourceManager.GetString(nameof(A11y_ChartData_Compare), Culture) ?? nameof(A11y_ChartData_Compare);
public static string A11y_ChartData_Input => ResourceManager.GetString(nameof(A11y_ChartData_Input), Culture) ?? nameof(A11y_ChartData_Input);
public static string A11y_ChartData_Latency => ResourceManager.GetString(nameof(A11y_ChartData_Latency), Culture) ?? nameof(A11y_ChartData_Latency);
public static string A11y_ChartData_Sessions => ResourceManager.GetString(nameof(A11y_ChartData_Sessions), Culture) ?? nameof(A11y_ChartData_Sessions);
@@ -2418,6 +2513,8 @@ public static class Strings
public static string ChangeExe_Unreadable_Format => ResourceManager.GetString(nameof(ChangeExe_Unreadable_Format), Culture) ?? nameof(ChangeExe_Unreadable_Format);
public static string Chart_Axis_Battery => ResourceManager.GetString(nameof(Chart_Axis_Battery), Culture) ?? nameof(Chart_Axis_Battery);
public static string Chart_Axis_Count => ResourceManager.GetString(nameof(Chart_Axis_Count), Culture) ?? nameof(Chart_Axis_Count);
public static string Chart_Axis_Fps => ResourceManager.GetString(nameof(Chart_Axis_Fps), Culture) ?? nameof(Chart_Axis_Fps);
@@ -2438,8 +2535,24 @@ public static class Strings
public static string Chart_Decimated_Format => ResourceManager.GetString(nameof(Chart_Decimated_Format), Culture) ?? nameof(Chart_Decimated_Format);
public static string Chart_Input_Device_Format => ResourceManager.GetString(nameof(Chart_Input_Device_Format), Culture) ?? nameof(Chart_Input_Device_Format);
public static string Chart_Input_Event_BatteryLow => ResourceManager.GetString(nameof(Chart_Input_Event_BatteryLow), Culture) ?? nameof(Chart_Input_Event_BatteryLow);
public static string Chart_Input_Event_Connected => ResourceManager.GetString(nameof(Chart_Input_Event_Connected), Culture) ?? nameof(Chart_Input_Event_Connected);
public static string Chart_Input_Event_Disconnected => ResourceManager.GetString(nameof(Chart_Input_Event_Disconnected), Culture) ?? nameof(Chart_Input_Event_Disconnected);
public static string Chart_Input_FourLevels => ResourceManager.GetString(nameof(Chart_Input_FourLevels), Culture) ?? nameof(Chart_Input_FourLevels);
public static string Chart_Input_NotStored => ResourceManager.GetString(nameof(Chart_Input_NotStored), Culture) ?? nameof(Chart_Input_NotStored);
public static string Chart_InputBattery_NotRead => ResourceManager.GetString(nameof(Chart_InputBattery_NotRead), Culture) ?? nameof(Chart_InputBattery_NotRead);
public static string Chart_Note_GapsClosed_Format => ResourceManager.GetString(nameof(Chart_Note_GapsClosed_Format), Culture) ?? nameof(Chart_Note_GapsClosed_Format);
public static string Chart_Note_GapsClosed_Marks_Format => ResourceManager.GetString(nameof(Chart_Note_GapsClosed_Marks_Format), Culture) ?? nameof(Chart_Note_GapsClosed_Marks_Format);
public static string Chart_Note_NoApplicationFrames => ResourceManager.GetString(nameof(Chart_Note_NoApplicationFrames), Culture) ?? nameof(Chart_Note_NoApplicationFrames);
public static string Chart_Note_OutsideRange_Format => ResourceManager.GetString(nameof(Chart_Note_OutsideRange_Format), Culture) ?? nameof(Chart_Note_OutsideRange_Format);
@@ -2544,6 +2657,8 @@ public static class Strings
public static string Compare_Metric_AvgGpuLoad => ResourceManager.GetString(nameof(Compare_Metric_AvgGpuLoad), Culture) ?? nameof(Compare_Metric_AvgGpuLoad);
public static string Compare_Metric_Controllers => ResourceManager.GetString(nameof(Compare_Metric_Controllers), Culture) ?? nameof(Compare_Metric_Controllers);
public static string Compare_Metric_Display => ResourceManager.GetString(nameof(Compare_Metric_Display), Culture) ?? nameof(Compare_Metric_Display);
public static string Compare_Metric_Displayed => ResourceManager.GetString(nameof(Compare_Metric_Displayed), Culture) ?? nameof(Compare_Metric_Displayed);
@@ -2580,6 +2695,8 @@ public static class Strings
public static string Compare_Metric_P1Low => ResourceManager.GetString(nameof(Compare_Metric_P1Low), Culture) ?? nameof(Compare_Metric_P1Low);
public static string Compare_Metric_PlayedWith => ResourceManager.GetString(nameof(Compare_Metric_PlayedWith), Culture) ?? nameof(Compare_Metric_PlayedWith);
public static string Compare_Metric_PowerLimit => ResourceManager.GetString(nameof(Compare_Metric_PowerLimit), Culture) ?? nameof(Compare_Metric_PowerLimit);
public static string Compare_Metric_Presented => ResourceManager.GetString(nameof(Compare_Metric_Presented), Culture) ?? nameof(Compare_Metric_Presented);
@@ -3206,6 +3323,30 @@ public static class Strings
public static string GameDetail_ChangeExe => ResourceManager.GetString(nameof(GameDetail_ChangeExe), Culture) ?? nameof(GameDetail_ChangeExe);
public static string GameDetail_Controller_Libraries_Label => ResourceManager.GetString(nameof(GameDetail_Controller_Libraries_Label), Culture) ?? nameof(GameDetail_Controller_Libraries_Label);
public static string GameDetail_Controller_Libraries_NoneSeen => ResourceManager.GetString(nameof(GameDetail_Controller_Libraries_NoneSeen), Culture) ?? nameof(GameDetail_Controller_Libraries_NoneSeen);
public static string GameDetail_Controller_Libraries_Unknown => ResourceManager.GetString(nameof(GameDetail_Controller_Libraries_Unknown), Culture) ?? nameof(GameDetail_Controller_Libraries_Unknown);
public static string GameDetail_Controller_Played_Label => ResourceManager.GetString(nameof(GameDetail_Controller_Played_Label), Culture) ?? nameof(GameDetail_Controller_Played_Label);
public static string GameDetail_Controller_Played_Many_Format => ResourceManager.GetString(nameof(GameDetail_Controller_Played_Many_Format), Culture) ?? nameof(GameDetail_Controller_Played_Many_Format);
public static string GameDetail_Controller_Played_One_Format => ResourceManager.GetString(nameof(GameDetail_Controller_Played_One_Format), Culture) ?? nameof(GameDetail_Controller_Played_One_Format);
public static string GameDetail_Controller_Played_Unknown => ResourceManager.GetString(nameof(GameDetail_Controller_Played_Unknown), Culture) ?? nameof(GameDetail_Controller_Played_Unknown);
public static string GameDetail_Controller_Store_Full => ResourceManager.GetString(nameof(GameDetail_Controller_Store_Full), Culture) ?? nameof(GameDetail_Controller_Store_Full);
public static string GameDetail_Controller_Store_Label => ResourceManager.GetString(nameof(GameDetail_Controller_Store_Label), Culture) ?? nameof(GameDetail_Controller_Store_Label);
public static string GameDetail_Controller_Store_None => ResourceManager.GetString(nameof(GameDetail_Controller_Store_None), Culture) ?? nameof(GameDetail_Controller_Store_None);
public static string GameDetail_Controller_Store_Partial => ResourceManager.GetString(nameof(GameDetail_Controller_Store_Partial), Culture) ?? nameof(GameDetail_Controller_Store_Partial);
public static string GameDetail_Controller_Store_Unknown => ResourceManager.GetString(nameof(GameDetail_Controller_Store_Unknown), Culture) ?? nameof(GameDetail_Controller_Store_Unknown);
public static string GameDetail_DeleteSessions => ResourceManager.GetString(nameof(GameDetail_DeleteSessions), Culture) ?? nameof(GameDetail_DeleteSessions);
public static string GameDetail_Details_Architecture => ResourceManager.GetString(nameof(GameDetail_Details_Architecture), Culture) ?? nameof(GameDetail_Details_Architecture);
@@ -3524,6 +3665,122 @@ public static class Strings
public static string Import_Title => ResourceManager.GetString(nameof(Import_Title), Culture) ?? nameof(Import_Title);
public static string Input_Bar_Name_Format => ResourceManager.GetString(nameof(Input_Bar_Name_Format), Culture) ?? nameof(Input_Bar_Name_Format);
public static string Input_Battery_Drain_Format => ResourceManager.GetString(nameof(Input_Battery_Drain_Format), Culture) ?? nameof(Input_Battery_Drain_Format);
public static string Input_Battery_Header => ResourceManager.GetString(nameof(Input_Battery_Header), Culture) ?? nameof(Input_Battery_Header);
public static string Input_Battery_Level_Empty => ResourceManager.GetString(nameof(Input_Battery_Level_Empty), Culture) ?? nameof(Input_Battery_Level_Empty);
public static string Input_Battery_Level_Full => ResourceManager.GetString(nameof(Input_Battery_Level_Full), Culture) ?? nameof(Input_Battery_Level_Full);
public static string Input_Battery_Level_Low => ResourceManager.GetString(nameof(Input_Battery_Level_Low), Culture) ?? nameof(Input_Battery_Level_Low);
public static string Input_Battery_Level_Medium => ResourceManager.GetString(nameof(Input_Battery_Level_Medium), Culture) ?? nameof(Input_Battery_Level_Medium);
public static string Input_Battery_Longest_Format => ResourceManager.GetString(nameof(Input_Battery_Longest_Format), Culture) ?? nameof(Input_Battery_Longest_Format);
public static string Input_Battery_NotRead => ResourceManager.GetString(nameof(Input_Battery_NotRead), Culture) ?? nameof(Input_Battery_NotRead);
public static string Input_Battery_Span_Format => ResourceManager.GetString(nameof(Input_Battery_Span_Format), Culture) ?? nameof(Input_Battery_Span_Format);
public static string Input_Battery_State_Charging => ResourceManager.GetString(nameof(Input_Battery_State_Charging), Culture) ?? nameof(Input_Battery_State_Charging);
public static string Input_Battery_State_Charging_Format => ResourceManager.GetString(nameof(Input_Battery_State_Charging_Format), Culture) ?? nameof(Input_Battery_State_Charging_Format);
public static string Input_Battery_State_Discharging => ResourceManager.GetString(nameof(Input_Battery_State_Discharging), Culture) ?? nameof(Input_Battery_State_Discharging);
public static string Input_Battery_State_Discharging_Format => ResourceManager.GetString(nameof(Input_Battery_State_Discharging_Format), Culture) ?? nameof(Input_Battery_State_Discharging_Format);
public static string Input_Battery_State_Full => ResourceManager.GetString(nameof(Input_Battery_State_Full), Culture) ?? nameof(Input_Battery_State_Full);
public static string Input_Battery_State_Unknown => ResourceManager.GetString(nameof(Input_Battery_State_Unknown), Culture) ?? nameof(Input_Battery_State_Unknown);
public static string Input_Battery_State_Wired => ResourceManager.GetString(nameof(Input_Battery_State_Wired), Culture) ?? nameof(Input_Battery_State_Wired);
public static string Input_Class_Both => ResourceManager.GetString(nameof(Input_Class_Both), Culture) ?? nameof(Input_Class_Both);
public static string Input_Class_Controller => ResourceManager.GetString(nameof(Input_Class_Controller), Culture) ?? nameof(Input_Class_Controller);
public static string Input_Class_KeyboardMouse => ResourceManager.GetString(nameof(Input_Class_KeyboardMouse), Culture) ?? nameof(Input_Class_KeyboardMouse);
public static string Input_Class_None => ResourceManager.GetString(nameof(Input_Class_None), Culture) ?? nameof(Input_Class_None);
public static string Input_Col_Battery => ResourceManager.GetString(nameof(Input_Col_Battery), Culture) ?? nameof(Input_Col_Battery);
public static string Input_Col_Connected => ResourceManager.GetString(nameof(Input_Col_Connected), Culture) ?? nameof(Input_Col_Connected);
public static string Input_Col_Connection => ResourceManager.GetString(nameof(Input_Col_Connection), Culture) ?? nameof(Input_Col_Connection);
public static string Input_Col_Controller => ResourceManager.GetString(nameof(Input_Col_Controller), Culture) ?? nameof(Input_Col_Controller);
public static string Input_Col_Events => ResourceManager.GetString(nameof(Input_Col_Events), Culture) ?? nameof(Input_Col_Events);
public static string Input_Col_InUse => ResourceManager.GetString(nameof(Input_Col_InUse), Culture) ?? nameof(Input_Col_InUse);
public static string Input_Col_Method => ResourceManager.GetString(nameof(Input_Col_Method), Culture) ?? nameof(Input_Col_Method);
public static string Input_Connection_Bluetooth => ResourceManager.GetString(nameof(Input_Connection_Bluetooth), Culture) ?? nameof(Input_Connection_Bluetooth);
public static string Input_Connection_Unknown => ResourceManager.GetString(nameof(Input_Connection_Unknown), Culture) ?? nameof(Input_Connection_Unknown);
public static string Input_Connection_Usb => ResourceManager.GetString(nameof(Input_Connection_Usb), Culture) ?? nameof(Input_Connection_Usb);
public static string Input_Connection_Wireless => ResourceManager.GetString(nameof(Input_Connection_Wireless), Culture) ?? nameof(Input_Connection_Wireless);
public static string Input_Context_Format => ResourceManager.GetString(nameof(Input_Context_Format), Culture) ?? nameof(Input_Context_Format);
public static string Input_Controller_Remapped_Format => ResourceManager.GetString(nameof(Input_Controller_Remapped_Format), Culture) ?? nameof(Input_Controller_Remapped_Format);
public static string Input_Controller_Unnamed_Format => ResourceManager.GetString(nameof(Input_Controller_Unnamed_Format), Culture) ?? nameof(Input_Controller_Unnamed_Format);
public static string Input_Controller_Virtual_Format => ResourceManager.GetString(nameof(Input_Controller_Virtual_Format), Culture) ?? nameof(Input_Controller_Virtual_Format);
public static string Input_Controllers_Header => ResourceManager.GetString(nameof(Input_Controllers_Header), Culture) ?? nameof(Input_Controllers_Header);
public static string Input_Controllers_None => ResourceManager.GetString(nameof(Input_Controllers_None), Culture) ?? nameof(Input_Controllers_None);
public static string Input_Controllers_NoneSeen => ResourceManager.GetString(nameof(Input_Controllers_NoneSeen), Culture) ?? nameof(Input_Controllers_NoneSeen);
public static string Input_Events_Format => ResourceManager.GetString(nameof(Input_Events_Format), Culture) ?? nameof(Input_Events_Format);
public static string Input_Family_Nintendo => ResourceManager.GetString(nameof(Input_Family_Nintendo), Culture) ?? nameof(Input_Family_Nintendo);
public static string Input_Family_Other => ResourceManager.GetString(nameof(Input_Family_Other), Culture) ?? nameof(Input_Family_Other);
public static string Input_Family_PlayStation => ResourceManager.GetString(nameof(Input_Family_PlayStation), Culture) ?? nameof(Input_Family_PlayStation);
public static string Input_Family_Xbox => ResourceManager.GetString(nameof(Input_Family_Xbox), Culture) ?? nameof(Input_Family_Xbox);
public static string Input_Header => ResourceManager.GetString(nameof(Input_Header), Culture) ?? nameof(Input_Header);
public static string Input_Limits_Note => ResourceManager.GetString(nameof(Input_Limits_Note), Culture) ?? nameof(Input_Limits_Note);
public static string Input_Makers_Format => ResourceManager.GetString(nameof(Input_Makers_Format), Culture) ?? nameof(Input_Makers_Format);
public static string Input_Missing_NeverInFront => ResourceManager.GetString(nameof(Input_Missing_NeverInFront), Culture) ?? nameof(Input_Missing_NeverInFront);
public static string Input_Missing_NotRecorded => ResourceManager.GetString(nameof(Input_Missing_NotRecorded), Culture) ?? nameof(Input_Missing_NotRecorded);
public static string Input_Missing_Terms => ResourceManager.GetString(nameof(Input_Missing_Terms), Culture) ?? nameof(Input_Missing_Terms);
public static string Input_Note_Faults_Format => ResourceManager.GetString(nameof(Input_Note_Faults_Format), Culture) ?? nameof(Input_Note_Faults_Format);
public static string Input_Note_NoLastInput => ResourceManager.GetString(nameof(Input_Note_NoLastInput), Culture) ?? nameof(Input_Note_NoLastInput);
public static string Input_Note_NoRawInput => ResourceManager.GetString(nameof(Input_Note_NoRawInput), Culture) ?? nameof(Input_Note_NoRawInput);
public static string Input_Note_NoXInput => ResourceManager.GetString(nameof(Input_Note_NoXInput), Culture) ?? nameof(Input_Note_NoXInput);
public static string Input_Note_VirtualPad => ResourceManager.GetString(nameof(Input_Note_VirtualPad), Culture) ?? nameof(Input_Note_VirtualPad);
public static string Input_Shares_Format => ResourceManager.GetString(nameof(Input_Shares_Format), Culture) ?? nameof(Input_Shares_Format);
public static string Input_Switches_Format => ResourceManager.GetString(nameof(Input_Switches_Format), Culture) ?? nameof(Input_Switches_Format);
public static string Input_Timeline_Header => ResourceManager.GetString(nameof(Input_Timeline_Header), Culture) ?? nameof(Input_Timeline_Header);
public static string Latency_Avg => ResourceManager.GetString(nameof(Latency_Avg), Culture) ?? nameof(Latency_Avg);
public static string Latency_Axis => ResourceManager.GetString(nameof(Latency_Axis), Culture) ?? nameof(Latency_Axis);
@@ -4092,6 +4349,10 @@ public static class Strings
public static string Settings_HookedGames_Revoke => ResourceManager.GetString(nameof(Settings_HookedGames_Revoke), Culture) ?? nameof(Settings_HookedGames_Revoke);
public static string Settings_Input_Body => ResourceManager.GetString(nameof(Settings_Input_Body), Culture) ?? nameof(Settings_Input_Body);
public static string Settings_Input_Label => ResourceManager.GetString(nameof(Settings_Input_Label), Culture) ?? nameof(Settings_Input_Label);
public static string Settings_Interval_Body => ResourceManager.GetString(nameof(Settings_Interval_Body), Culture) ?? nameof(Settings_Interval_Body);
public static string Settings_Interval_Label => ResourceManager.GetString(nameof(Settings_Interval_Label), Culture) ?? nameof(Settings_Interval_Label);
@@ -4266,6 +4527,8 @@ public static class Strings
public static string Summary_Show_Displayed => ResourceManager.GetString(nameof(Summary_Show_Displayed), Culture) ?? nameof(Summary_Show_Displayed);
public static string Summary_Show_InputEvents => ResourceManager.GetString(nameof(Summary_Show_InputEvents), Culture) ?? nameof(Summary_Show_InputEvents);
public static string Summary_Show_Sensors => ResourceManager.GetString(nameof(Summary_Show_Sensors), Culture) ?? nameof(Summary_Show_Sensors);
public static string Summary_Stat_Avg => ResourceManager.GetString(nameof(Summary_Stat_Avg), Culture) ?? nameof(Summary_Stat_Avg);
@@ -4476,6 +4739,8 @@ public static class Strings
public static string Trend_Metric_AvgRam => ResourceManager.GetString(nameof(Trend_Metric_AvgRam), Culture) ?? nameof(Trend_Metric_AvgRam);
public static string Trend_Metric_ControllerShare => ResourceManager.GetString(nameof(Trend_Metric_ControllerShare), Culture) ?? nameof(Trend_Metric_ControllerShare);
public static string Trend_Metric_DisplayBorderless => ResourceManager.GetString(nameof(Trend_Metric_DisplayBorderless), Culture) ?? nameof(Trend_Metric_DisplayBorderless);
public static string Trend_Metric_Displayed => ResourceManager.GetString(nameof(Trend_Metric_Displayed), Culture) ?? nameof(Trend_Metric_Displayed);
@@ -4500,6 +4765,8 @@ public static class Strings
public static string Trend_Metric_GpuCoreClock => ResourceManager.GetString(nameof(Trend_Metric_GpuCoreClock), Culture) ?? nameof(Trend_Metric_GpuCoreClock);
public static string Trend_Metric_KeyboardMouseShare => ResourceManager.GetString(nameof(Trend_Metric_KeyboardMouseShare), Culture) ?? nameof(Trend_Metric_KeyboardMouseShare);
public static string Trend_Metric_Label => ResourceManager.GetString(nameof(Trend_Metric_Label), Culture) ?? nameof(Trend_Metric_Label);
public static string Trend_Metric_MaxCpuTemp => ResourceManager.GetString(nameof(Trend_Metric_MaxCpuTemp), Culture) ?? nameof(Trend_Metric_MaxCpuTemp);
+357 -1
View File
@@ -1589,6 +1589,14 @@
<value>詳細メトリクス</value>
<comment>review</comment>
</data>
<data name="Settings_Input_Body" xml:space="preserve">
<value>セッションが何でプレイされたかを記録します - 接続されていたゲーム コントローラーと使用中だったコントローラー、そのバッテリー残量、キーボードまたはマウスが使われていたかどうか - を時間として、ゲームからではなく Windows から読み取ります。ボタン、スティック、キー、文字は保存されず、コントローラーには何も送信されず、これを説明するプライバシー ポリシーに同意するまでは何も読み取りません。オフ: これらは読み取りも保存もされません。次のセッションから適用され、オフの間に記録されたセッションが後から補われることはありません。</value>
<comment>review</comment>
</data>
<data name="Settings_Input_Label" xml:space="preserve">
<value>コントローラーと入力</value>
<comment>review</comment>
</data>
<data name="Settings_Appearance_Header" xml:space="preserve">
<value>外観</value>
<comment>review</comment>
@@ -2474,7 +2482,7 @@
<comment>review</comment>
</data>
<data name="Tier_NotHooked_Tooltip" xml:space="preserve">
<value>ティア 2: フックなし — 時間、センサー、ゲームのメモリのみ。フレームから算出する値はすべて N/A</value>
<value>ティア 2: フックなし — 時間、センサー、ゲームのメモリ、何でプレイされたかのみ。フレームから算出する値はすべて N/A</value>
<comment>review</comment>
</data>
<data name="Upscaler_None" xml:space="preserve">
@@ -4477,6 +4485,354 @@
<value>NVIDIA App の上書き</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Libraries_Label" xml:space="preserve">
<value>読み込まれた入力ライブラリ</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Libraries_NoneSeen" xml:space="preserve">
<value>内部から計測した直近のセッションでは見つかりませんでした</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Libraries_Unknown" xml:space="preserve">
<value>N/A - ゲーム内部から計測したセッションでのみ分かります</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Played_Label" xml:space="preserve">
<value>ふだんのプレイ方法</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Played_Many_Format" xml:space="preserve">
<value>コントローラー {0} · キーボードとマウス {1} · 両方 {2} · 入力なし {3} - ゲームが前面にあった時間に対する割合、{4} セッション</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Played_One_Format" xml:space="preserve">
<value>コントローラー {0} · キーボードとマウス {1} · 両方 {2} · 入力なし {3} - ゲームが前面にあった時間に対する割合、{4} セッション</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Played_Unknown" xml:space="preserve">
<value>N/A - まだ記録したセッションがありません</value>
<comment>review</comment>
</data>
<data name="Input_Header" xml:space="preserve">
<value>プレイ方法</value>
<comment>review</comment>
</data>
<data name="Input_Limits_Note" xml:space="preserve">
<value>ゲームの外側で Windows から読み取ります。ゲームが前面にある間にコントローラー、またはキーボードかマウスが使われていたことだけを示し、どのボタンやキーかは決して記録せず、ゲームがそれをどう扱ったかも示しません。キーボードとマウスは一つの区分です。</value>
<comment>review</comment>
</data>
<data name="Input_Context_Format" xml:space="preserve">
<value>読み取り時間 {0}、ゲームが前面にあった時間 {1}。割合は前面にあった時間に対するものです。</value>
<comment>review</comment>
</data>
<data name="Input_Class_Controller" xml:space="preserve">
<value>コントローラー</value>
<comment>review</comment>
</data>
<data name="Input_Class_KeyboardMouse" xml:space="preserve">
<value>キーボードとマウス</value>
<comment>review</comment>
</data>
<data name="Input_Class_Both" xml:space="preserve">
<value>両方同時</value>
<comment>review</comment>
</data>
<data name="Input_Class_None" xml:space="preserve">
<value>入力なし</value>
<comment>review</comment>
</data>
<data name="Input_Col_Method" xml:space="preserve">
<value>入力</value>
<comment>review</comment>
</data>
<data name="Input_Bar_Name_Format" xml:space="preserve">
<value>前面にあった時間に占める割合(プレイ方法別): {0}</value>
<comment>review</comment>
</data>
<data name="Input_Switches_Format" xml:space="preserve">
<value>コントローラーとキーボード・マウスの切り替え回数: {0}</value>
<comment>review</comment>
</data>
<data name="Input_Controllers_Header" xml:space="preserve">
<value>コントローラー</value>
<comment>review</comment>
</data>
<data name="Input_Controllers_NoneSeen" xml:space="preserve">
<value>このセッション中に接続されたコントローラーはありません。</value>
<comment>review</comment>
</data>
<data name="Input_Controllers_None" xml:space="preserve">
<value>なし</value>
<comment>review</comment>
</data>
<data name="Input_Col_Controller" xml:space="preserve">
<value>コントローラー</value>
<comment>review</comment>
</data>
<data name="Input_Col_Connection" xml:space="preserve">
<value>接続</value>
<comment>review</comment>
</data>
<data name="Input_Col_InUse" xml:space="preserve">
<value>使用時間</value>
<comment>review</comment>
</data>
<data name="Input_Col_Connected" xml:space="preserve">
<value>接続時間</value>
<comment>review</comment>
</data>
<data name="Input_Col_Events" xml:space="preserve">
<value>接続 / 切断</value>
<comment>review</comment>
</data>
<data name="Input_Col_Battery" xml:space="preserve">
<value>バッテリー</value>
<comment>review</comment>
</data>
<data name="Input_Events_Format" xml:space="preserve">
<value>{0} / {1}</value>
<comment>review</comment>
</data>
<data name="Input_Controller_Unnamed_Format" xml:space="preserve">
<value>{0} コントローラー</value>
<comment>review</comment>
</data>
<data name="Input_Controller_Virtual_Format" xml:space="preserve">
<value>{0}(プログラムが提示する仮想パッド)</value>
<comment>review</comment>
</data>
<data name="Input_Controller_Remapped_Format" xml:space="preserve">
<value>{0}(ゲームには Xbox パッドとしても提示)</value>
<comment>review</comment>
</data>
<data name="Input_Family_Xbox" xml:space="preserve">
<value>Xbox</value>
<comment>review</comment>
</data>
<data name="Input_Family_PlayStation" xml:space="preserve">
<value>PlayStation</value>
<comment>review</comment>
</data>
<data name="Input_Family_Nintendo" xml:space="preserve">
<value>Nintendo</value>
<comment>review</comment>
</data>
<data name="Input_Family_Other" xml:space="preserve">
<value>その他</value>
<comment>review</comment>
</data>
<data name="Input_Connection_Usb" xml:space="preserve">
<value>USB</value>
<comment>review</comment>
</data>
<data name="Input_Connection_Bluetooth" xml:space="preserve">
<value>Bluetooth</value>
<comment>review</comment>
</data>
<data name="Input_Connection_Wireless" xml:space="preserve">
<value>ワイヤレスアダプター</value>
<comment>review</comment>
</data>
<data name="Input_Connection_Unknown" xml:space="preserve">
<value>不明</value>
<comment>review</comment>
</data>
<data name="Input_Battery_NotRead" xml:space="preserve">
<value>N/A - バッテリー残量は読み取れませんでした</value>
<comment>review</comment>
</data>
<data name="Input_Battery_Longest_Format" xml:space="preserve">
<value>最長: {0}({1})</value>
<comment>review</comment>
</data>
<data name="Input_Battery_Span_Format" xml:space="preserve">
<value>{0} → {1}</value>
<comment>review</comment>
</data>
<data name="Input_Battery_Drain_Format" xml:space="preserve">
<value>1 時間あたり {0:0.0}%</value>
<comment>review</comment>
</data>
<data name="Input_Battery_State_Wired" xml:space="preserve">
<value>有線</value>
<comment>review</comment>
</data>
<data name="Input_Battery_State_Full" xml:space="preserve">
<value>満充電</value>
<comment>review</comment>
</data>
<data name="Input_Battery_State_Charging" xml:space="preserve">
<value>充電中</value>
<comment>review</comment>
</data>
<data name="Input_Battery_State_Charging_Format" xml:space="preserve">
<value>充電中({0})</value>
<comment>review</comment>
</data>
<data name="Input_Battery_State_Discharging" xml:space="preserve">
<value>バッテリー駆動</value>
<comment>review</comment>
</data>
<data name="Input_Battery_State_Discharging_Format" xml:space="preserve">
<value>バッテリー駆動({0})</value>
<comment>review</comment>
</data>
<data name="Input_Battery_State_Unknown" xml:space="preserve">
<value>状態不明</value>
<comment>review</comment>
</data>
<data name="Input_Battery_Level_Empty" xml:space="preserve">
<value>空</value>
<comment>review</comment>
</data>
<data name="Input_Battery_Level_Low" xml:space="preserve">
<value>低</value>
<comment>review</comment>
</data>
<data name="Input_Battery_Level_Medium" xml:space="preserve">
<value>中</value>
<comment>review</comment>
</data>
<data name="Input_Battery_Level_Full" xml:space="preserve">
<value>満</value>
<comment>review</comment>
</data>
<data name="Input_Makers_Format" xml:space="preserve">
<value>メーカー別(コントローラー使用時間に対して): {0}。メーカーの切り替え回数: {1}。</value>
<comment>review</comment>
</data>
<data name="Input_Note_VirtualPad" xml:space="preserve">
<value>このセッションでは Steam Input または別のリマップソフトが、コントローラーを仮想 Xbox パッドとしてゲームに提示しました。コントローラーとその代わりのパッドは一つとして数えています。</value>
<comment>review</comment>
</data>
<data name="Input_Note_NoRawInput" xml:space="preserve">
<value>このセッションでは Windows がコントローラーのレポートの登録を受け付けなかったため、Xbox 互換のコントローラーしか確認できませんでした。</value>
<comment>review</comment>
</data>
<data name="Input_Note_NoXInput" xml:space="preserve">
<value>このセッションでは XInput を読み取れなかったため、Xbox 互換のコントローラーはレポートを通じてのみ確認され、バッテリー残量はありません。</value>
<comment>review</comment>
</data>
<data name="Input_Note_NoLastInput" xml:space="preserve">
<value>このセッションでは Windows が最後のキーボードまたはマウス入力の時刻を報告しなかったため、キーボードとマウスの使用は確認できませんでした。</value>
<comment>review</comment>
</data>
<data name="Input_Note_Faults_Format" xml:space="preserve">
<value>このセッションで読み取りが {0} 回失敗しました。数値は読み取れた分のみです。</value>
<comment>review</comment>
</data>
<data name="Input_Missing_Terms" xml:space="preserve">
<value>このセッションでは読み取っていません。この読み取りを説明するプライバシーポリシーが、この PC でまだ承諾されていませんでした。</value>
<comment>review</comment>
</data>
<data name="Input_Missing_NeverInFront" xml:space="preserve">
<value>読み取りましたが、その間ゲームのウィンドウが前面になかったため、表示できる割合がありません。</value>
<comment>review</comment>
</data>
<data name="Input_Missing_NotRecorded" xml:space="preserve">
<value>このセッションでは記録されていません。設定 ▸ コントローラーと入力がオフだったか、0.1.0-beta.50 より前のセッションです。</value>
<comment>review</comment>
</data>
<data name="Input_Shares_Format" xml:space="preserve">
<value>コントローラー {0} · キーボードとマウス {1} · 両方 {2} · 入力なし {3}</value>
<comment>review</comment>
</data>
<data name="Input_Timeline_Header" xml:space="preserve">
<value>セッション中の入力</value>
<comment>review</comment>
</data>
<data name="Input_Battery_Header" xml:space="preserve">
<value>コントローラーのバッテリー</value>
<comment>review</comment>
</data>
<data name="Summary_Show_InputEvents" xml:space="preserve">
<value>コントローラーのマーク</value>
<comment>review</comment>
</data>
<data name="Chart_Axis_Battery" xml:space="preserve">
<value>バッテリー (%)</value>
<comment>review</comment>
</data>
<data name="Chart_Input_Event_Connected" xml:space="preserve">
<value>コントローラー接続</value>
<comment>review</comment>
</data>
<data name="Chart_Input_Event_Disconnected" xml:space="preserve">
<value>コントローラー切断</value>
<comment>review</comment>
</data>
<data name="Chart_Input_Event_BatteryLow" xml:space="preserve">
<value>コントローラーのバッテリー低下</value>
<comment>review</comment>
</data>
<data name="Chart_Input_Device_Format" xml:space="preserve">
<value>コントローラー {0}</value>
<comment>review</comment>
</data>
<data name="Chart_Input_FourLevels" xml:space="preserve">
<value>(4 段階)</value>
<comment>review</comment>
</data>
<data name="Chart_Input_NotStored" xml:space="preserve">
<value>このセッションには入力の系列が保存されていません。</value>
<comment>review</comment>
</data>
<data name="Chart_InputBattery_NotRead" xml:space="preserve">
<value>このセッションでバッテリー残量を報告したコントローラーはありません。</value>
<comment>review</comment>
</data>
<data name="Chart_Note_GapsClosed_Marks_Format" xml:space="preserve">
<value>時間軸は {0} 個の空白(一時停止、または失われた記録)を詰めているため、それ以降はコントローラーのマークがフレームより先に進みます。</value>
<comment>review</comment>
</data>
<data name="A11y_Chart_InputTimeline" xml:space="preserve">
<value>セッション中の入力のグラフ</value>
<comment>review</comment>
</data>
<data name="A11y_Chart_InputBattery" xml:space="preserve">
<value>コントローラーのバッテリーのグラフ</value>
<comment>review</comment>
</data>
<data name="A11y_ChartData_Input" xml:space="preserve">
<value>これらの数値は「プレイ方法」の表に記載されています。セッションの CSV と JSON のエクスポートに合計が含まれます。</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_ControllerShare" xml:space="preserve">
<value>コントローラーの割合</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_KeyboardMouseShare" xml:space="preserve">
<value>キーボードとマウスの割合</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_PlayedWith" xml:space="preserve">
<value>プレイ方法</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_Controllers" xml:space="preserve">
<value>コントローラー</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Store_Full" xml:space="preserve">
<value>フル対応 - Steam の記載</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Store_Label" xml:space="preserve">
<value>コントローラー対応 (ストア)</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Store_None" xml:space="preserve">
<value>Steam に対応の記載なし</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Store_Partial" xml:space="preserve">
<value>一部対応 - Steam の記載</value>
<comment>review</comment>
</data>
<data name="GameDetail_Controller_Store_Unknown" xml:space="preserve">
<value>N/A - この PC にはこのゲームを記載したストアのファイルがありません</value>
<comment>review</comment>
</data>
<data name="End_Running" xml:space="preserve">
<value>キャプチャは時間指定で、ゲームの実行中に終了しました。</value>
<comment>review</comment>
+268 -1
View File
@@ -1197,6 +1197,12 @@
<data name="Settings_Advanced_Label" xml:space="preserve">
<value>Advanced metrics</value>
</data>
<data name="Settings_Input_Body" xml:space="preserve">
<value>Record what a session was played with: which game controllers were connected and in use, their battery level, and whether the keyboard or mouse was in use - as times, read from Windows and never from the game. No button, stick, key or text is kept, nothing is sent to a controller, and nothing is read until you have accepted the Privacy Policy that describes it. Off: nothing of this is read or stored. It applies from the next session, and a session recorded while it was off is not filled in later.</value>
</data>
<data name="Settings_Input_Label" xml:space="preserve">
<value>Controllers and input</value>
</data>
<data name="Settings_Appearance_Header" xml:space="preserve">
<value>Appearance</value>
</data>
@@ -1861,7 +1867,7 @@
<value>T2</value>
</data>
<data name="Tier_NotHooked_Tooltip" xml:space="preserve">
<value>Tier 2: not hooked — duration, sensors and the game's memory only; every frame-derived value is N/A</value>
<value>Tier 2: not hooked — duration, sensors, the game's memory and what it was played with only; every frame-derived value is N/A</value>
</data>
<data name="Upscaler_None" xml:space="preserve">
<value>No upscaler</value>
@@ -3368,6 +3374,267 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="GameDetail_Details_NvidiaOverride" xml:space="preserve">
<value>NVIDIA App override</value>
</data>
<data name="GameDetail_Controller_Libraries_Label" xml:space="preserve">
<value>Input libraries loaded</value>
</data>
<data name="GameDetail_Controller_Libraries_NoneSeen" xml:space="preserve">
<value>None seen in the last session measured from inside</value>
</data>
<data name="GameDetail_Controller_Libraries_Unknown" xml:space="preserve">
<value>N/A - known only from a session measured from inside the game</value>
</data>
<data name="GameDetail_Controller_Played_Label" xml:space="preserve">
<value>Usually played with</value>
</data>
<data name="GameDetail_Controller_Played_Many_Format" xml:space="preserve">
<value>Controller {0} · keyboard and mouse {1} · both {2} · no input {3} - of the time in front, over {4} sessions</value>
</data>
<data name="GameDetail_Controller_Played_One_Format" xml:space="preserve">
<value>Controller {0} · keyboard and mouse {1} · both {2} · no input {3} - of the time in front, over {4} session</value>
</data>
<data name="GameDetail_Controller_Played_Unknown" xml:space="preserve">
<value>N/A - no session has recorded it yet</value>
</data>
<data name="Input_Header" xml:space="preserve">
<value>Played with</value>
</data>
<data name="Input_Limits_Note" xml:space="preserve">
<value>Read from Windows, outside the game: it says a controller, or the keyboard or mouse, was in use while the game was in front - never which button or key, and not what the game did with it. Keyboard and mouse are one class.</value>
</data>
<data name="Input_Context_Format" xml:space="preserve">
<value>Read for {0}; the game was in front for {1}. The shares are of the time in front.</value>
</data>
<data name="Input_Class_Controller" xml:space="preserve">
<value>Controller</value>
</data>
<data name="Input_Class_KeyboardMouse" xml:space="preserve">
<value>Keyboard and mouse</value>
</data>
<data name="Input_Class_Both" xml:space="preserve">
<value>Both at once</value>
</data>
<data name="Input_Class_None" xml:space="preserve">
<value>No input</value>
</data>
<data name="Input_Col_Method" xml:space="preserve">
<value>Input</value>
</data>
<data name="Input_Bar_Name_Format" xml:space="preserve">
<value>Share of the time in front by what the game was played with: {0}</value>
</data>
<data name="Input_Switches_Format" xml:space="preserve">
<value>Changes between a controller and the keyboard and mouse: {0}</value>
</data>
<data name="Input_Controllers_Header" xml:space="preserve">
<value>Controllers</value>
</data>
<data name="Input_Controllers_NoneSeen" xml:space="preserve">
<value>No controller was connected during this session.</value>
</data>
<data name="Input_Controllers_None" xml:space="preserve">
<value>none</value>
</data>
<data name="Input_Col_Controller" xml:space="preserve">
<value>Controller</value>
</data>
<data name="Input_Col_Connection" xml:space="preserve">
<value>Connection</value>
</data>
<data name="Input_Col_InUse" xml:space="preserve">
<value>In use</value>
</data>
<data name="Input_Col_Connected" xml:space="preserve">
<value>Connected</value>
</data>
<data name="Input_Col_Events" xml:space="preserve">
<value>Connected / dropped</value>
</data>
<data name="Input_Col_Battery" xml:space="preserve">
<value>Battery</value>
</data>
<data name="Input_Events_Format" xml:space="preserve">
<value>{0} / {1}</value>
</data>
<data name="Input_Controller_Unnamed_Format" xml:space="preserve">
<value>{0} controller</value>
</data>
<data name="Input_Controller_Virtual_Format" xml:space="preserve">
<value>{0} (a virtual pad a program presents)</value>
</data>
<data name="Input_Controller_Remapped_Format" xml:space="preserve">
<value>{0} (also shown to games as an Xbox pad)</value>
</data>
<data name="Input_Family_Xbox" xml:space="preserve">
<value>Xbox</value>
</data>
<data name="Input_Family_PlayStation" xml:space="preserve">
<value>PlayStation</value>
</data>
<data name="Input_Family_Nintendo" xml:space="preserve">
<value>Nintendo</value>
</data>
<data name="Input_Family_Other" xml:space="preserve">
<value>Other</value>
</data>
<data name="Input_Connection_Usb" xml:space="preserve">
<value>USB</value>
</data>
<data name="Input_Connection_Bluetooth" xml:space="preserve">
<value>Bluetooth</value>
</data>
<data name="Input_Connection_Wireless" xml:space="preserve">
<value>Wireless adapter</value>
</data>
<data name="Input_Connection_Unknown" xml:space="preserve">
<value>Unknown</value>
</data>
<data name="Input_Battery_NotRead" xml:space="preserve">
<value>N/A - no battery level was read</value>
</data>
<data name="Input_Battery_Longest_Format" xml:space="preserve">
<value>Longest: {0} for {1}</value>
</data>
<data name="Input_Battery_Span_Format" xml:space="preserve">
<value>{0} → {1}</value>
</data>
<data name="Input_Battery_Drain_Format" xml:space="preserve">
<value>{0:0.0}% an hour</value>
</data>
<data name="Input_Battery_State_Wired" xml:space="preserve">
<value>wired</value>
</data>
<data name="Input_Battery_State_Full" xml:space="preserve">
<value>full</value>
</data>
<data name="Input_Battery_State_Charging" xml:space="preserve">
<value>charging</value>
</data>
<data name="Input_Battery_State_Charging_Format" xml:space="preserve">
<value>charging at {0}</value>
</data>
<data name="Input_Battery_State_Discharging" xml:space="preserve">
<value>on battery</value>
</data>
<data name="Input_Battery_State_Discharging_Format" xml:space="preserve">
<value>on battery at {0}</value>
</data>
<data name="Input_Battery_State_Unknown" xml:space="preserve">
<value>state unknown</value>
</data>
<data name="Input_Battery_Level_Empty" xml:space="preserve">
<value>empty</value>
</data>
<data name="Input_Battery_Level_Low" xml:space="preserve">
<value>low</value>
</data>
<data name="Input_Battery_Level_Medium" xml:space="preserve">
<value>medium</value>
</data>
<data name="Input_Battery_Level_Full" xml:space="preserve">
<value>full</value>
</data>
<data name="Input_Makers_Format" xml:space="preserve">
<value>By maker, of the time controllers were in use: {0}. Changes of maker: {1}.</value>
</data>
<data name="Input_Note_VirtualPad" xml:space="preserve">
<value>Steam Input, or another remapper, presented a controller to games as a virtual Xbox pad in this session; a controller and the pad that stood for it are counted once.</value>
</data>
<data name="Input_Note_NoRawInput" xml:space="preserve">
<value>Windows did not accept the registration for controller reports in this session, so only Xbox-compatible controllers were seen.</value>
</data>
<data name="Input_Note_NoXInput" xml:space="preserve">
<value>XInput could not be read in this session, so Xbox-compatible controllers were seen only through their reports and have no battery level.</value>
</data>
<data name="Input_Note_NoLastInput" xml:space="preserve">
<value>Windows did not report the time of the last keyboard or mouse input in this session, so keyboard and mouse use was not seen.</value>
</data>
<data name="Input_Note_Faults_Format" xml:space="preserve">
<value>The reader faulted {0} time(s) in this session; the figures cover what it read.</value>
</data>
<data name="Input_Missing_Terms" xml:space="preserve">
<value>Not read in this session: the Privacy Policy that describes this reading had not been accepted on this PC yet.</value>
</data>
<data name="Input_Missing_NeverInFront" xml:space="preserve">
<value>Read, but the game's window was never in front while it was, so there is no share to show.</value>
</data>
<data name="Input_Missing_NotRecorded" xml:space="preserve">
<value>Not recorded for this session: Settings ▸ Controllers and input was off, or the session is from before 0.1.0-beta.50.</value>
</data>
<data name="Input_Shares_Format" xml:space="preserve">
<value>Controller {0} · keyboard and mouse {1} · both {2} · no input {3}</value>
</data>
<data name="Input_Timeline_Header" xml:space="preserve">
<value>Input over the session</value>
</data>
<data name="Input_Battery_Header" xml:space="preserve">
<value>Controller battery</value>
</data>
<data name="Summary_Show_InputEvents" xml:space="preserve">
<value>Controller marks</value>
</data>
<data name="Chart_Axis_Battery" xml:space="preserve">
<value>Battery (%)</value>
</data>
<data name="Chart_Input_Event_Connected" xml:space="preserve">
<value>Controller connected</value>
</data>
<data name="Chart_Input_Event_Disconnected" xml:space="preserve">
<value>Controller disconnected</value>
</data>
<data name="Chart_Input_Event_BatteryLow" xml:space="preserve">
<value>Controller battery low</value>
</data>
<data name="Chart_Input_Device_Format" xml:space="preserve">
<value>Controller {0}</value>
</data>
<data name="Chart_Input_FourLevels" xml:space="preserve">
<value>(four levels)</value>
</data>
<data name="Chart_Input_NotStored" xml:space="preserve">
<value>This session stored no input series.</value>
</data>
<data name="Chart_InputBattery_NotRead" xml:space="preserve">
<value>No controller reported a battery level in this session.</value>
</data>
<data name="Chart_Note_GapsClosed_Marks_Format" xml:space="preserve">
<value>The time axis closes up {0} gap(s) — a pause, or records that were lost — so the controller marks run ahead of the frames after each.</value>
</data>
<data name="A11y_Chart_InputTimeline" xml:space="preserve">
<value>Input over the session chart</value>
</data>
<data name="A11y_Chart_InputBattery" xml:space="preserve">
<value>Controller battery chart</value>
</data>
<data name="A11y_ChartData_Input" xml:space="preserve">
<value>The Played with tables write these numbers out; the session's CSV and JSON exports carry the totals.</value>
</data>
<data name="Trend_Metric_ControllerShare" xml:space="preserve">
<value>Controller share</value>
</data>
<data name="Trend_Metric_KeyboardMouseShare" xml:space="preserve">
<value>Keyboard and mouse share</value>
</data>
<data name="Compare_Metric_PlayedWith" xml:space="preserve">
<value>Played with</value>
</data>
<data name="Compare_Metric_Controllers" xml:space="preserve">
<value>Controllers</value>
</data>
<data name="GameDetail_Controller_Store_Full" xml:space="preserve">
<value>Full - as Steam lists it</value>
</data>
<data name="GameDetail_Controller_Store_Label" xml:space="preserve">
<value>Controller support (store)</value>
</data>
<data name="GameDetail_Controller_Store_None" xml:space="preserve">
<value>Steam lists none</value>
</data>
<data name="GameDetail_Controller_Store_Partial" xml:space="preserve">
<value>Partial - as Steam lists it</value>
</data>
<data name="GameDetail_Controller_Store_Unknown" xml:space="preserve">
<value>N/A - no store file on this PC describes this game</value>
</data>
<data name="End_Running" xml:space="preserve">
<value>The capture was bounded and ended while the game still ran.</value>
</data>
+268 -1
View File
@@ -1192,6 +1192,12 @@
<data name="Settings_Advanced_Label" xml:space="preserve">
<value>Thông số nâng cao</value>
</data>
<data name="Settings_Input_Body" xml:space="preserve">
<value>Ghi lại phiên được chơi bằng gì: tay cầm nào đang kết nối và đang được dùng, mức pin của chúng, và bàn phím hay chuột có được dùng hay không - dưới dạng thời gian, đọc từ Windows chứ không bao giờ từ game. Không lưu nút, cần, phím hay văn bản nào, không gửi gì tới tay cầm, và không đọc gì cho tới khi bạn chấp nhận Chính sách quyền riêng tư mô tả việc này. Tắt: không đọc hay lưu gì trong số này. Áp dụng từ phiên kế tiếp; phiên ghi lúc đang tắt sẽ không được bổ sung về sau.</value>
</data>
<data name="Settings_Input_Label" xml:space="preserve">
<value>Tay cầm và thao tác nhập</value>
</data>
<data name="Settings_Appearance_Header" xml:space="preserve">
<value>Giao diện</value>
</data>
@@ -1856,7 +1862,7 @@
<value>T2</value>
</data>
<data name="Tier_NotHooked_Tooltip" xml:space="preserve">
<value>Mức 2: không hook — chỉ có thời lượng, cảm biến và bộ nhớ của game; mọi giá trị suy ra từ khung hình đều là N/A</value>
<value>Mức 2: không hook — chỉ có thời lượng, cảm biến, bộ nhớ của game và việc phiên được chơi bằng gì; mọi giá trị suy ra từ khung hình đều là N/A</value>
</data>
<data name="Upscaler_None" xml:space="preserve">
<value>Không upscaler</value>
@@ -3363,6 +3369,267 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
<data name="GameDetail_Details_NvidiaOverride" xml:space="preserve">
<value>Ghi đè của NVIDIA App</value>
</data>
<data name="GameDetail_Controller_Libraries_Label" xml:space="preserve">
<value>Thư viện nhập đã nạp</value>
</data>
<data name="GameDetail_Controller_Libraries_NoneSeen" xml:space="preserve">
<value>Không thấy thư viện nào trong phiên gần nhất được đo từ bên trong</value>
</data>
<data name="GameDetail_Controller_Libraries_Unknown" xml:space="preserve">
<value>N/A - chỉ biết được từ một phiên được đo từ bên trong game</value>
</data>
<data name="GameDetail_Controller_Played_Label" xml:space="preserve">
<value>Thường chơi bằng</value>
</data>
<data name="GameDetail_Controller_Played_Many_Format" xml:space="preserve">
<value>Tay cầm {0} · bàn phím và chuột {1} · cả hai {2} · không thao tác {3} - trên thời gian game ở phía trước, qua {4} phiên</value>
</data>
<data name="GameDetail_Controller_Played_One_Format" xml:space="preserve">
<value>Tay cầm {0} · bàn phím và chuột {1} · cả hai {2} · không thao tác {3} - trên thời gian game ở phía trước, qua {4} phiên</value>
</data>
<data name="GameDetail_Controller_Played_Unknown" xml:space="preserve">
<value>N/A - chưa có phiên nào ghi lại</value>
</data>
<data name="Input_Header" xml:space="preserve">
<value>Chơi bằng</value>
</data>
<data name="Input_Limits_Note" xml:space="preserve">
<value>Đọc từ Windows, bên ngoài game: chỉ cho biết tay cầm, hoặc bàn phím hay chuột, đang được dùng khi game ở phía trước - không bao giờ là nút hay phím nào, và không phải game đã làm gì với nó. Bàn phím và chuột là một loại.</value>
</data>
<data name="Input_Context_Format" xml:space="preserve">
<value>Đã đọc trong {0}; game ở phía trước trong {1}. Tỉ lệ tính trên thời gian game ở phía trước.</value>
</data>
<data name="Input_Class_Controller" xml:space="preserve">
<value>Tay cầm</value>
</data>
<data name="Input_Class_KeyboardMouse" xml:space="preserve">
<value>Bàn phím và chuột</value>
</data>
<data name="Input_Class_Both" xml:space="preserve">
<value>Cả hai cùng lúc</value>
</data>
<data name="Input_Class_None" xml:space="preserve">
<value>Không thao tác</value>
</data>
<data name="Input_Col_Method" xml:space="preserve">
<value>Thiết bị nhập</value>
</data>
<data name="Input_Bar_Name_Format" xml:space="preserve">
<value>Tỉ lệ thời gian game ở phía trước theo thiết bị dùng để chơi: {0}</value>
</data>
<data name="Input_Switches_Format" xml:space="preserve">
<value>Số lần đổi giữa tay cầm và bàn phím-chuột: {0}</value>
</data>
<data name="Input_Controllers_Header" xml:space="preserve">
<value>Tay cầm</value>
</data>
<data name="Input_Controllers_NoneSeen" xml:space="preserve">
<value>Không có tay cầm nào được kết nối trong phiên này.</value>
</data>
<data name="Input_Controllers_None" xml:space="preserve">
<value>không có</value>
</data>
<data name="Input_Col_Controller" xml:space="preserve">
<value>Tay cầm</value>
</data>
<data name="Input_Col_Connection" xml:space="preserve">
<value>Kết nối</value>
</data>
<data name="Input_Col_InUse" xml:space="preserve">
<value>Đang dùng</value>
</data>
<data name="Input_Col_Connected" xml:space="preserve">
<value>Đã kết nối</value>
</data>
<data name="Input_Col_Events" xml:space="preserve">
<value>Kết nối / ngắt</value>
</data>
<data name="Input_Col_Battery" xml:space="preserve">
<value>Pin</value>
</data>
<data name="Input_Events_Format" xml:space="preserve">
<value>{0} / {1}</value>
</data>
<data name="Input_Controller_Unnamed_Format" xml:space="preserve">
<value>Tay cầm {0}</value>
</data>
<data name="Input_Controller_Virtual_Format" xml:space="preserve">
<value>{0} (tay cầm ảo do một chương trình tạo ra)</value>
</data>
<data name="Input_Controller_Remapped_Format" xml:space="preserve">
<value>{0} (cũng được trình cho game như một tay cầm Xbox)</value>
</data>
<data name="Input_Family_Xbox" xml:space="preserve">
<value>Xbox</value>
</data>
<data name="Input_Family_PlayStation" xml:space="preserve">
<value>PlayStation</value>
</data>
<data name="Input_Family_Nintendo" xml:space="preserve">
<value>Nintendo</value>
</data>
<data name="Input_Family_Other" xml:space="preserve">
<value>Khác</value>
</data>
<data name="Input_Connection_Usb" xml:space="preserve">
<value>USB</value>
</data>
<data name="Input_Connection_Bluetooth" xml:space="preserve">
<value>Bluetooth</value>
</data>
<data name="Input_Connection_Wireless" xml:space="preserve">
<value>Bộ thu không dây</value>
</data>
<data name="Input_Connection_Unknown" xml:space="preserve">
<value>Không rõ</value>
</data>
<data name="Input_Battery_NotRead" xml:space="preserve">
<value>N/A - không đọc được mức pin</value>
</data>
<data name="Input_Battery_Longest_Format" xml:space="preserve">
<value>Lâu nhất: {0} trong {1}</value>
</data>
<data name="Input_Battery_Span_Format" xml:space="preserve">
<value>{0} → {1}</value>
</data>
<data name="Input_Battery_Drain_Format" xml:space="preserve">
<value>{0:0.0}% mỗi giờ</value>
</data>
<data name="Input_Battery_State_Wired" xml:space="preserve">
<value>có dây</value>
</data>
<data name="Input_Battery_State_Full" xml:space="preserve">
<value>đầy</value>
</data>
<data name="Input_Battery_State_Charging" xml:space="preserve">
<value>đang sạc</value>
</data>
<data name="Input_Battery_State_Charging_Format" xml:space="preserve">
<value>đang sạc ở mức {0}</value>
</data>
<data name="Input_Battery_State_Discharging" xml:space="preserve">
<value>dùng pin</value>
</data>
<data name="Input_Battery_State_Discharging_Format" xml:space="preserve">
<value>dùng pin ở mức {0}</value>
</data>
<data name="Input_Battery_State_Unknown" xml:space="preserve">
<value>không rõ trạng thái</value>
</data>
<data name="Input_Battery_Level_Empty" xml:space="preserve">
<value>cạn</value>
</data>
<data name="Input_Battery_Level_Low" xml:space="preserve">
<value>thấp</value>
</data>
<data name="Input_Battery_Level_Medium" xml:space="preserve">
<value>vừa</value>
</data>
<data name="Input_Battery_Level_Full" xml:space="preserve">
<value>đầy</value>
</data>
<data name="Input_Makers_Format" xml:space="preserve">
<value>Theo hãng, trên thời gian tay cầm được dùng: {0}. Số lần đổi hãng: {1}.</value>
</data>
<data name="Input_Note_VirtualPad" xml:space="preserve">
<value>Trong phiên này Steam Input, hoặc một phần mềm ánh xạ khác, đã trình một tay cầm cho game dưới dạng tay cầm Xbox ảo; tay cầm thật và tay cầm ảo thay cho nó chỉ được tính một lần.</value>
</data>
<data name="Input_Note_NoRawInput" xml:space="preserve">
<value>Windows không chấp nhận việc đăng ký nhận báo cáo của tay cầm trong phiên này, nên chỉ thấy được các tay cầm tương thích Xbox.</value>
</data>
<data name="Input_Note_NoXInput" xml:space="preserve">
<value>Không đọc được XInput trong phiên này, nên tay cầm tương thích Xbox chỉ được thấy qua báo cáo của chúng và không có mức pin.</value>
</data>
<data name="Input_Note_NoLastInput" xml:space="preserve">
<value>Windows không báo thời điểm thao tác bàn phím hay chuột gần nhất trong phiên này, nên không thấy được việc dùng bàn phím và chuột.</value>
</data>
<data name="Input_Note_Faults_Format" xml:space="preserve">
<value>Bộ đọc gặp lỗi {0} lần trong phiên này; các con số chỉ gồm những gì nó đọc được.</value>
</data>
<data name="Input_Missing_Terms" xml:space="preserve">
<value>Không đọc trong phiên này: Chính sách quyền riêng tư mô tả việc đọc này chưa được chấp nhận trên máy này.</value>
</data>
<data name="Input_Missing_NeverInFront" xml:space="preserve">
<value>Đã đọc, nhưng cửa sổ game chưa lần nào ở phía trước trong lúc đó, nên không có tỉ lệ để hiển thị.</value>
</data>
<data name="Input_Missing_NotRecorded" xml:space="preserve">
<value>Không được ghi cho phiên này: mục Cài đặt ▸ Tay cầm và thiết bị nhập đang tắt, hoặc phiên có từ trước bản 0.1.0-beta.50.</value>
</data>
<data name="Input_Shares_Format" xml:space="preserve">
<value>Tay cầm {0} · bàn phím và chuột {1} · cả hai {2} · không thao tác {3}</value>
</data>
<data name="Input_Timeline_Header" xml:space="preserve">
<value>Thiết bị nhập theo thời gian</value>
</data>
<data name="Input_Battery_Header" xml:space="preserve">
<value>Pin tay cầm</value>
</data>
<data name="Summary_Show_InputEvents" xml:space="preserve">
<value>Mốc tay cầm</value>
</data>
<data name="Chart_Axis_Battery" xml:space="preserve">
<value>Pin (%)</value>
</data>
<data name="Chart_Input_Event_Connected" xml:space="preserve">
<value>Tay cầm kết nối</value>
</data>
<data name="Chart_Input_Event_Disconnected" xml:space="preserve">
<value>Tay cầm ngắt kết nối</value>
</data>
<data name="Chart_Input_Event_BatteryLow" xml:space="preserve">
<value>Pin tay cầm thấp</value>
</data>
<data name="Chart_Input_Device_Format" xml:space="preserve">
<value>Tay cầm {0}</value>
</data>
<data name="Chart_Input_FourLevels" xml:space="preserve">
<value>(bốn mức)</value>
</data>
<data name="Chart_Input_NotStored" xml:space="preserve">
<value>Phiên này không lưu chuỗi dữ liệu thiết bị nhập nào.</value>
</data>
<data name="Chart_InputBattery_NotRead" xml:space="preserve">
<value>Không tay cầm nào báo mức pin trong phiên này.</value>
</data>
<data name="Chart_Note_GapsClosed_Marks_Format" xml:space="preserve">
<value>Trục thời gian khép lại {0} khoảng trống — một lần tạm dừng, hoặc bản ghi bị mất — nên các mốc tay cầm chạy trước các khung hình sau mỗi khoảng.</value>
</data>
<data name="A11y_Chart_InputTimeline" xml:space="preserve">
<value>Biểu đồ thiết bị nhập theo thời gian</value>
</data>
<data name="A11y_Chart_InputBattery" xml:space="preserve">
<value>Biểu đồ pin tay cầm</value>
</data>
<data name="A11y_ChartData_Input" xml:space="preserve">
<value>Các bảng trong mục Chơi bằng ghi rõ những con số này; file xuất CSV và JSON của phiên chứa các tổng.</value>
</data>
<data name="Trend_Metric_ControllerShare" xml:space="preserve">
<value>Tỉ lệ dùng tay cầm</value>
</data>
<data name="Trend_Metric_KeyboardMouseShare" xml:space="preserve">
<value>Tỉ lệ dùng bàn phím và chuột</value>
</data>
<data name="Compare_Metric_PlayedWith" xml:space="preserve">
<value>Chơi bằng</value>
</data>
<data name="Compare_Metric_Controllers" xml:space="preserve">
<value>Tay cầm</value>
</data>
<data name="GameDetail_Controller_Store_Full" xml:space="preserve">
<value>Đầy đủ - theo Steam ghi</value>
</data>
<data name="GameDetail_Controller_Store_Label" xml:space="preserve">
<value>Hỗ trợ tay cầm (cửa hàng)</value>
</data>
<data name="GameDetail_Controller_Store_None" xml:space="preserve">
<value>Steam không ghi hỗ trợ</value>
</data>
<data name="GameDetail_Controller_Store_Partial" xml:space="preserve">
<value>Một phần - theo Steam ghi</value>
</data>
<data name="GameDetail_Controller_Store_Unknown" xml:space="preserve">
<value>N/A - không có file cửa hàng nào trên máy này mô tả game này</value>
</data>
<data name="End_Running" xml:space="preserve">
<value>Phiên ghi có giới hạn thời gian và đã kết thúc khi game vẫn đang chạy.</value>
</data>
@@ -297,6 +297,10 @@ public sealed partial class CompareViewModel : ObservableObject
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Display, [.. rows.Select(static r => new CompareCell(DisplayText.Shares(DisplayText.Of(r)), false))]));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Window, [.. rows.Select(static r => new CompareCell(DisplayText.Window(DisplayText.Of(r)), false))]));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Monitor, [.. rows.Select(static r => new CompareCell(DisplayText.Monitor(DisplayText.Of(r)), false))]));
// 0.1.0-beta.50: what each session was played with, both tiers. Facts again: no way of playing is the better one.
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_PlayedWith, [.. rows.Select(static r => new CompareCell(InputPresentation.SharesText(r), false))]));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Controllers, [.. rows.Select(static r => new CompareCell(InputPresentation.ControllersText(r), false))]));
}
/// <summary>
@@ -437,6 +437,8 @@ public sealed partial class GameDetailViewModel : ObservableObject
new(TrendMetric.DisplayExclusiveShare, Strings.Trend_Metric_DisplayExclusive),
new(TrendMetric.DisplayBorderlessShare, Strings.Trend_Metric_DisplayBorderless),
new(TrendMetric.DisplayWindowedShare, Strings.Trend_Metric_DisplayWindowed),
new(TrendMetric.ControllerShare, Strings.Trend_Metric_ControllerShare),
new(TrendMetric.KeyboardMouseShare, Strings.Trend_Metric_KeyboardMouseShare),
new(TrendMetric.TimeBelow60, Strings.Trend_Metric_TimeBelow60),
new(TrendMetric.TimeBelowRefresh, Strings.Trend_Metric_TimeBelowRefresh),
new(TrendMetric.FrameToFrame, Strings.Trend_Metric_FrameToFrame),
@@ -1278,6 +1280,12 @@ public sealed partial class GameDetailViewModel : ObservableObject
{
Details.Add(new GameDetailRow(Strings.GameDetail_Details_NvidiaOverride, NvidiaOverrides.OverridesText(profile)));
}
// 0.1.0-beta.50 (D163): "does it support controllers?" as three pieces of evidence, each with its source, and no
// verdict - what the store's own file lists, which input libraries the game loaded, how it has been played.
Details.Add(new GameDetailRow(Strings.GameDetail_Controller_Store_Label, ControllerEvidence.StoreText(row)));
Details.Add(new GameDetailRow(Strings.GameDetail_Controller_Libraries_Label, ControllerEvidence.LibrariesText(detail.Sessions)));
Details.Add(new GameDetailRow(Strings.GameDetail_Controller_Played_Label, ControllerEvidence.PlayedWithText(detail.Sessions)));
}
private void AddDetail(string label, string? value)
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.App.Controls;
namespace FrameLedger.App.ViewModels;
/// <summary>
/// One row of the summary's "Played with" table (0.1.0-beta.50): a class of input, its share of the time the game was
/// in front and how long that was - from the row's stored totals, never recomputed from the series.
/// </summary>
/// <param name="Label"><c>Controller</c>, <c>Keyboard and mouse</c>, <c>Both at once</c> or <c>No input</c>.</param>
/// <param name="Share">One decimal (<c>83.2%</c>).</param>
/// <param name="Duration">The time the class covers.</param>
/// <param name="Segment">The row as the bar draws it.</param>
public sealed record InputClassRowModel(string Label, string Share, string Duration, InputShareSegment Segment)
{
/// <summary>The row's colour, as a one-segment bar beside its label.</summary>
public IReadOnlyList<InputShareSegment> Swatch { get; } = [Segment with { Share = 1 }];
/// <summary>The row in one line, as a screen reader reads it.</summary>
public override string ToString() => Services.SpokenText.Pair(Label, Services.SpokenText.List(Share, Duration));
}
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.ViewModels;
/// <summary>
/// One controller of a session in the summary's table (0.1.0-beta.50), from <c>sessions.input_devices</c>: what it was,
/// how it was connected, how long it was in use and connected, how often it connected and dropped, and its battery.
/// Never a serial number, an address or a device path - the ledger has none to show.
/// </summary>
/// <param name="Name">The model's name, or the maker's with "controller"; a pad a program presents says so.</param>
/// <param name="Connection">USB, Bluetooth, a wireless adapter, or unknown.</param>
/// <param name="InUse">The time it was in use while the game was in front.</param>
/// <param name="Connected">The time it was connected.</param>
/// <param name="Events">How many times it connected and dropped after the session's first reading.</param>
/// <param name="Battery">The state held longest and for how long, the first and last level, the drain - or why there is none.</param>
public sealed record InputControllerRowModel(string Name, string Connection, string InUse, string Connected, string Events, string Battery)
{
/// <summary>The row in one line, as a screen reader reads it: each figure with the heading of its column.</summary>
public override string ToString() => Services.SpokenText.Pair(Name, Services.SpokenText.List(
Connection,
Services.SpokenText.Pair(Strings.Input_Col_InUse, InUse),
Services.SpokenText.Pair(Strings.Input_Col_Connected, Connected),
Services.SpokenText.Pair(Strings.Input_Col_Events, Events),
Services.SpokenText.Pair(Strings.Input_Col_Battery, Battery)));
}
@@ -166,6 +166,61 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
[ObservableProperty]
private string? _fgMixMissing;
/// <summary>0.1.0-beta.50: the session stored what it was played with and the game was in front, so the block is shown.</summary>
[ObservableProperty]
private bool _hasInput;
/// <summary>The four classes as the bar draws them, in the table's order.</summary>
[ObservableProperty]
private IReadOnlyList<InputShareSegment> _inputSegments = [];
/// <summary>The bar's spoken name: every class with its share.</summary>
[ObservableProperty]
private string _inputName = string.Empty;
/// <summary>How long the session was read and how long the game was in front - what the shares are shares of.</summary>
[ObservableProperty]
private string? _inputContext;
/// <summary>How often the session went from a controller to the keyboard and mouse or back.</summary>
[ObservableProperty]
private string? _inputSwitches;
/// <summary>The session had a controller, so their table is shown.</summary>
[ObservableProperty]
private bool _hasInputControllers;
/// <summary>That no controller was connected, for a session that was read and saw none; null otherwise.</summary>
[ObservableProperty]
private string? _inputNoControllers;
/// <summary>Each maker's share of the controllers' time and how often the maker changed; null with fewer than two makers.</summary>
[ObservableProperty]
private string? _inputMakers;
/// <summary>What the reader could not do in this session and what Windows showed twice, a sentence a line; null with nothing to add.</summary>
[ObservableProperty]
private string? _inputNotes;
/// <summary>Why the session shows no "Played with" (<see cref="InputPresentation.Missing"/>); null when it does.</summary>
[ObservableProperty]
private string? _inputMissing;
/// <summary>The session stored its input series, so the timeline is drawn.</summary>
[ObservableProperty]
private bool _hasInputCharts;
/// <summary>A controller of the session reported a battery, so its chart is drawn.</summary>
[ObservableProperty]
private bool _hasInputBattery;
/// <summary>The frame-time chart can carry the controller marks: there are some, and the frames' place on the sensors' clock is known.</summary>
[ObservableProperty]
private bool _hasInputEvents;
[ObservableProperty]
private bool _showInputEvents = true;
[ObservableProperty]
private string _tags = string.Empty;
@@ -238,6 +293,32 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
public static string FgMixTimeHeader => Strings.FgMix_Col_Time;
public static string InputHeader => Strings.Input_Header;
public static string InputLimitsNote => Strings.Input_Limits_Note;
public static string InputMethodHeader => Strings.Input_Col_Method;
public static string InputControllersHeader => Strings.Input_Controllers_Header;
public static string InputControllerHeader => Strings.Input_Col_Controller;
public static string InputConnectionHeader => Strings.Input_Col_Connection;
public static string InputInUseHeader => Strings.Input_Col_InUse;
public static string InputConnectedHeader => Strings.Input_Col_Connected;
public static string InputEventsHeader => Strings.Input_Col_Events;
public static string InputBatteryColumnHeader => Strings.Input_Col_Battery;
public static string InputTimelineHeader => Strings.Input_Timeline_Header;
public static string InputBatteryHeader => Strings.Input_Battery_Header;
public static string ShowInputEventsText => Strings.Summary_Show_InputEvents;
public static string AnnotationsHeader => Strings.Summary_Annotations_Header;
public static string TagsPlaceholder => Strings.Summary_Tags_Placeholder;
@@ -269,6 +350,21 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
/// <summary>What the Sensors section draws: <see cref="Series"/> for a hooked session, the sensors alone for one that was not.</summary>
public SessionSeries? SensorSeries { get; private set; }
/// <summary>The session's input series (0.1.0-beta.50) for the two charts; null for a session that stored none.</summary>
public InputSeries? InputSeries { get; private set; }
/// <summary>The session's controllers as stored (<c>sessions.input_devices</c>); null for a session with none.</summary>
public Application.Recording.InputDevicesRecord? InputDevices { get; private set; }
/// <summary>The controllers' connections, drops and low batteries, on the sensors' clock - the charts' marks.</summary>
public IReadOnlyList<InputEvent> InputEvents { get; private set; } = [];
/// <summary>What the session was played with, a row a class.</summary>
public ObservableCollection<InputClassRowModel> InputRows { get; } = [];
/// <summary>The session's controllers, a row each.</summary>
public ObservableCollection<InputControllerRowModel> InputControllers { get; } = [];
public ObservableCollection<StatCardModel> Stats { get; } = [];
/// <summary>beta.12: every series' stored mean, median, minimum and peak (<see cref="SensorStatsTable"/>).</summary>
@@ -303,6 +399,9 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
_snapshot = await _hardware.FindAsync(Row.SnapshotId, ct).ConfigureAwait(true);
Series = Row.Tier == CaptureTier.Hooked ? await _loader.LoadAsync(sessionId, ct).ConfigureAwait(true) : null;
SensorSeries = Series ?? (await _loader.LoadSensorsAsync(sessionId, ct).ConfigureAwait(true) is { Count: > 0 } sensors ? SessionSeries.SensorsOnly(sensors) : null);
// Both tiers (0.1.0-beta.50): what it was played with is read from outside the game.
InputSeries = Row.InputObservedMs is > 0 ? await _loader.LoadInputAsync(sessionId, ct).ConfigureAwait(true) : null;
Present();
}
@@ -458,10 +557,51 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
DecimationNote = Series is null ? string.Empty : string.Format(CultureInfo.CurrentCulture, Strings.Chart_Decimated_Format, Series.Presents, Math.Min(Series.Presents, Decimator.DefaultBuckets * 2));
PresentStats(row);
PresentFgMix(row);
PresentInput(row);
PresentChips();
Presented?.Invoke(this, EventArgs.Empty);
}
/// <summary>
/// 0.1.0-beta.50 (D155-D163): what the session was played with - the stored totals as a bar and a table, the controllers,
/// the makers, what the reader could not do - and why a session has none. Read from the row, never recomputed.
/// </summary>
private void PresentInput(SessionRow row)
{
IReadOnlyList<InputClassRowModel> rows = InputPresentation.Rows(row);
InputRows.Clear();
foreach (InputClassRowModel line in rows)
{
InputRows.Add(line);
}
HasInput = rows.Count > 0;
InputSegments = [.. rows.Select(static r => r.Segment)];
InputName = HasInput ? InputPresentation.AccessibleName(rows) : string.Empty;
InputContext = HasInput ? InputPresentation.Context(row) : null;
InputSwitches = InputPresentation.Switches(row);
InputMissing = InputPresentation.Missing(row);
// The controllers are shown for any session that was read, in front or not: a pad that sat connected is a fact too.
InputDevices = row.InputObservedMs is > 0 ? Application.Recording.InputDevicesRecord.Parse(row.InputDevicesJson) : null;
InputControllers.Clear();
foreach (InputControllerRowModel line in InputPresentation.Controllers(InputDevices))
{
InputControllers.Add(line);
}
HasInputControllers = InputControllers.Count > 0;
InputNoControllers = row.InputObservedMs is > 0 && !HasInputControllers ? Strings.Input_Controllers_NoneSeen : null;
InputMakers = InputPresentation.Makers(InputDevices);
IReadOnlyList<string> notes = InputPresentation.Notes(InputDevices);
InputNotes = notes.Count > 0 ? string.Join(Environment.NewLine, notes) : null;
InputEvents = InputSeries?.Events(InputDevices) ?? [];
HasInputCharts = InputSeries is { TimesS.Length: > 0 };
HasInputBattery = InputSeries is { } series && series.Devices.Any(static d => d.Battery is not null);
HasInputEvents = IsHooked && InputEvents.Count > 0 && Series?.SensorOffsetS is not null;
}
/// <summary>beta.24 (D62): the stored mix as rows and a bar, the setting that framed it, and why a session has none.</summary>
private void PresentFgMix(SessionRow row)
{
@@ -615,6 +755,9 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
return null;
}
// The input libraries ride the same snapshot since 0.1.0-beta.50 (D163) and are the game page's to show, as
// evidence of controller support: this line stays the upscaling and frame-generation libraries'.
modules = modules?.Where(static m => !ControllerEvidence.IsInputLibrary(m.Key)).ToDictionary(static m => m.Key, static m => m.Value, StringComparer.OrdinalIgnoreCase);
if (modules is null || modules.Count == 0)
{
return null;
@@ -87,6 +87,14 @@ public sealed partial class SettingsViewModel : ObservableObject
[ObservableProperty]
private bool _advancedMetrics;
/// <summary>
/// "Controllers and input" (owner decisions D155 and D156, <c>capture.input_devices</c>, on by default): the Agent
/// reads which controllers are connected and in use and the time of the last keyboard or mouse input, from outside
/// the game, and a session stores what it was played with; off, nothing of it is read or stored.
/// </summary>
[ObservableProperty]
private bool _inputDevices;
[ObservableProperty]
private int _minSessionSeconds;
@@ -443,6 +451,8 @@ public sealed partial class SettingsViewModel : ObservableObject
Persist(SettingsRegistry.TelemetryAdvanced, value);
}
partial void OnInputDevicesChanged(bool value) => Persist(SettingsRegistry.CaptureInputDevices, value);
partial void OnHideAntiCheatHookingChanged(bool value) => Persist(SettingsRegistry.UiHideAntiCheatHooking, value);
/// <summary>D33: the option is one settings row the Agent reads at every session start and command; the list follows it.</summary>
@@ -599,6 +609,7 @@ public sealed partial class SettingsViewModel : ObservableObject
RetentionRawSessions = await _settings.GetIntegerAsync(SettingsRegistry.RetentionRawSessionsPerGame).ConfigureAwait(true);
RemoveUninstalledGames = await _settings.GetBooleanAsync(SettingsRegistry.RetentionRemoveUninstalledGames).ConfigureAwait(true);
AdvancedMetrics = await _settings.GetBooleanAsync(SettingsRegistry.TelemetryAdvanced).ConfigureAwait(true);
InputDevices = await _settings.GetBooleanAsync(SettingsRegistry.CaptureInputDevices).ConfigureAwait(true);
MinimizeToTray = await _settings.GetBooleanAsync(SettingsRegistry.UiMinimizeToTray).ConfigureAwait(true);
HideAntiCheatHooking = await _settings.GetBooleanAsync(SettingsRegistry.UiHideAntiCheatHooking).ConfigureAwait(true);
UserModeExceptions = await _settings.GetBooleanAsync(SettingsRegistry.HookingUserModeExceptions).ConfigureAwait(true);
@@ -157,12 +157,17 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.FrametimeHeader}" />
<CheckBox Grid.Column="1" Margin="0,0,16,0" Content="{x:Static vm:SessionSummaryViewModel.ShowDisplayedText}"
IsChecked="{Binding ViewModel.ShowDisplayed}" IsEnabled="{Binding ViewModel.HasDisplayed}"
Visibility="{Binding ViewModel.HasDisplayed, Converter={StaticResource BoolToVis}}" />
<CheckBox Grid.Column="2" Content="{x:Static vm:SessionSummaryViewModel.ShowSensorsText}"
<!-- 0.1.0-beta.50: the controllers' connections, drops and low batteries as lines across the frames -->
<CheckBox Grid.Column="2" Margin="0,0,16,0" Content="{x:Static vm:SessionSummaryViewModel.ShowInputEventsText}"
IsChecked="{Binding ViewModel.ShowInputEvents}"
Visibility="{Binding ViewModel.HasInputEvents, Converter={StaticResource BoolToVis}}" />
<CheckBox Grid.Column="3" Content="{x:Static vm:SessionSummaryViewModel.ShowSensorsText}"
IsChecked="{Binding ViewModel.ShowSensors}" IsEnabled="{Binding ViewModel.HasSensors}" />
</Grid>
<ui:TextBlock Style="{StaticResource TertiaryText}" Text="{Binding ViewModel.DecimationNote}" />
@@ -230,6 +235,113 @@
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SensorStatsMissing}"
Visibility="{Binding ViewModel.SensorStatsMissing, Converter={StaticResource NullToCollapsed}}" />
<!-- 0.1.0-beta.50 (D155-D163): what the session was played with, both tiers - read from outside the game. The bar
draws in the chart palette's colours from code (InputShareBar); the tables carry every number in text. -->
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.InputHeader}" />
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.InputLimitsNote}" />
<ui:TextBlock Margin="0,4,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.InputMissing}"
Visibility="{Binding ViewModel.InputMissing, Converter={StaticResource NullToCollapsed}}" />
<StackPanel Visibility="{Binding ViewModel.HasInput, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Margin="0,4,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.InputContext}"
Visibility="{Binding ViewModel.InputContext, Converter={StaticResource NullToCollapsed}}" />
<controls:InputShareBar Margin="0,6,0,0" Height="14" Segments="{Binding ViewModel.InputSegments}"
AutomationProperties.Name="{Binding ViewModel.InputName}" />
<StackPanel Margin="0,8,0,0" Grid.IsSharedSizeScope="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="InputSwatch" />
<ColumnDefinition Width="Auto" SharedSizeGroup="InputMethod" />
<ColumnDefinition Width="Auto" SharedSizeGroup="InputShare" />
<ColumnDefinition Width="Auto" SharedSizeGroup="InputTime" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="1" Margin="0,0,24,4" FontTypography="BodyStrong" Text="{x:Static vm:SessionSummaryViewModel.InputMethodHeader}" />
<ui:TextBlock Grid.Column="2" Margin="0,0,24,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.FgMixShareHeader}" />
<ui:TextBlock Grid.Column="3" Margin="0,0,0,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.FgMixTimeHeader}" />
</Grid>
<ItemsControl ItemsSource="{Binding ViewModel.InputRows}" Focusable="False">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:InputClassRowModel}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="InputSwatch" />
<ColumnDefinition Width="Auto" SharedSizeGroup="InputMethod" />
<ColumnDefinition Width="Auto" SharedSizeGroup="InputShare" />
<ColumnDefinition Width="Auto" SharedSizeGroup="InputTime" />
</Grid.ColumnDefinitions>
<controls:InputShareBar Grid.Column="0" Width="12" Height="12" Margin="0,0,8,0" VerticalAlignment="Center" Segments="{Binding Swatch}" />
<ui:TextBlock Grid.Column="1" Margin="0,2,24,2" Text="{Binding Label}" />
<ui:TextBlock Grid.Column="2" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Share}" />
<ui:TextBlock Grid.Column="3" Margin="0,2,0,2" Style="{StaticResource SecondaryText}" TextAlignment="Right" Text="{Binding Duration}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<ui:TextBlock Margin="0,4,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.InputSwitches}"
Visibility="{Binding ViewModel.InputSwitches, Converter={StaticResource NullToCollapsed}}" />
</StackPanel>
<!-- the session's controllers: shown for any session that was read, in front or not -->
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.InputNoControllers}"
Visibility="{Binding ViewModel.InputNoControllers, Converter={StaticResource NullToCollapsed}}" />
<StackPanel Visibility="{Binding ViewModel.HasInputControllers, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" AutomationProperties.HeadingLevel="Level3" Text="{x:Static vm:SessionSummaryViewModel.InputControllersHeader}" />
<StackPanel Margin="0,6,0,0" Grid.IsSharedSizeScope="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="PadName" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PadConnection" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PadInUse" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PadConnected" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PadEvents" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" Margin="0,0,24,4" FontTypography="BodyStrong" Text="{x:Static vm:SessionSummaryViewModel.InputControllerHeader}" />
<ui:TextBlock Grid.Column="1" Margin="0,0,24,4" FontTypography="BodyStrong" Text="{x:Static vm:SessionSummaryViewModel.InputConnectionHeader}" />
<ui:TextBlock Grid.Column="2" Margin="0,0,24,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.InputInUseHeader}" />
<ui:TextBlock Grid.Column="3" Margin="0,0,24,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.InputConnectedHeader}" />
<ui:TextBlock Grid.Column="4" Margin="0,0,24,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.InputEventsHeader}" />
<ui:TextBlock Grid.Column="5" Margin="0,0,0,4" FontTypography="BodyStrong" Text="{x:Static vm:SessionSummaryViewModel.InputBatteryColumnHeader}" />
</Grid>
<ItemsControl ItemsSource="{Binding ViewModel.InputControllers}" Focusable="False">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:InputControllerRowModel}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="PadName" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PadConnection" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PadInUse" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PadConnected" />
<ColumnDefinition Width="Auto" SharedSizeGroup="PadEvents" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" Margin="0,2,24,2" Text="{Binding Name}" />
<ui:TextBlock Grid.Column="1" Margin="0,2,24,2" Text="{Binding Connection}" />
<ui:TextBlock Grid.Column="2" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding InUse}" />
<ui:TextBlock Grid.Column="3" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Connected}" />
<ui:TextBlock Grid.Column="4" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Events}" />
<ui:TextBlock Grid.Column="5" Margin="0,2,0,2" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding Battery}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<ui:TextBlock Margin="0,4,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.InputMakers}"
Visibility="{Binding ViewModel.InputMakers, Converter={StaticResource NullToCollapsed}}" />
</StackPanel>
<ui:TextBlock Margin="0,4,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.InputNotes}"
Visibility="{Binding ViewModel.InputNotes, Converter={StaticResource NullToCollapsed}}" />
<!-- the input series over the session, from its start: what each second was played with, then each battery -->
<StackPanel Visibility="{Binding ViewModel.HasInputCharts, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" AutomationProperties.HeadingLevel="Level3" Text="{x:Static vm:SessionSummaryViewModel.InputTimelineHeader}" />
<charts:InputTimelineChart x:Name="InputTimeline" Margin="0,6,0,0" Height="200" />
</StackPanel>
<StackPanel Visibility="{Binding ViewModel.HasInputBattery, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" AutomationProperties.HeadingLevel="Level3" Text="{x:Static vm:SessionSummaryViewModel.InputBatteryHeader}" />
<charts:InputBatteryChart x:Name="InputBattery" Margin="0,6,0,0" Height="200" />
</StackPanel>
<!-- annotations -->
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.AnnotationsHeader}" />
<ui:TextBox Margin="0,6,0,0" AutomationProperties.Name="{x:Static vm:SessionSummaryViewModel.TagsPlaceholder}" PlaceholderText="{x:Static vm:SessionSummaryViewModel.TagsPlaceholder}" Text="{Binding ViewModel.Tags, UpdateSourceTrigger=PropertyChanged}" />
@@ -54,6 +54,9 @@ public partial class SessionSummaryWindow : FluentWindow
case nameof(SessionSummaryViewModel.ShowSensors):
Frametime.SetSensors(ViewModel.ShowSensors);
break;
case nameof(SessionSummaryViewModel.ShowInputEvents):
Frametime.SetInputEvents(ViewModel.InputEvents, ViewModel.ShowInputEvents);
break;
default:
break;
}
@@ -61,10 +64,14 @@ public partial class SessionSummaryWindow : FluentWindow
private void Redraw()
{
// The marks first: set before the frames are drawn, they cost no second draw of them.
Frametime.SetInputEvents(ViewModel.InputEvents, ViewModel.ShowInputEvents);
Frametime.Show(ViewModel.Series, ViewModel.ShowDisplayed, ViewModel.ShowSensors);
Distribution.Show(ViewModel.Series);
RenderScale.Show(ViewModel.Series, ViewModel.Row);
Sensors.Show(ViewModel.SensorSeries);
InputTimeline.Show(ViewModel.InputSeries, ViewModel.InputEvents);
InputBattery.Show(ViewModel.InputSeries, ViewModel.InputDevices);
}
private void OnExportPng(object sender, RoutedEventArgs e) => _ = ViewModel.ExportPngAsync(Frametime.ScottPlot);
@@ -0,0 +1,45 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
namespace FrameLedger.Application.Input;
/// <summary>
/// The terms that describe the input reading, and whether they have been accepted on this PC (owner decision D156,
/// 2026-11-14). The option is on unless switched off, and the Agent is often started at logon - before the App that
/// shows a new Privacy Policy has been opened. So the Agent reads controllers and keyboard-and-mouse activity only
/// when the Privacy Policy the user accepted is the one that first described that reading, or a later one.
/// </summary>
public static class InputTerms
{
/// <summary>The Privacy Policy's key in <c>legal_acceptance</c> - the App's <c>LegalDocuments.Privacy</c>, which a test holds to this.</summary>
public const string PrivacyDocument = "privacy";
/// <summary>The first version of the Privacy Policy that describes the reading.</summary>
public const string MinimumPrivacyVersion = "2.22";
/// <summary>
/// Whether an accepted version is <see cref="MinimumPrivacyVersion"/> or later. A version is two whole numbers with
/// a dot between them, compared as numbers - 2.9 is before 2.22. No version, and anything that is not one, is not
/// accepted: a document nobody can be shown to have accepted permits nothing.
/// </summary>
public static bool Accepted(string? acceptedVersion) =>
Parse(acceptedVersion) is { } accepted && Parse(MinimumPrivacyVersion) is { } minimum
&& (accepted.Major > minimum.Major || (accepted.Major == minimum.Major && accepted.Minor >= minimum.Minor));
private static (int Major, int Minor)? Parse(string? version)
{
if (version is null)
{
return null;
}
string[] parts = version.Trim().Split('.');
return parts.Length == 2
&& int.TryParse(parts[0], NumberStyles.None, CultureInfo.InvariantCulture, out int major)
&& int.TryParse(parts[1], NumberStyles.None, CultureInfo.InvariantCulture, out int minor)
? (major, minor)
: null;
}
}
@@ -87,4 +87,12 @@ public interface IGameRepository
/// does not exist.
/// </summary>
ValueTask<bool> ApplyStoreMetadataAsync(long gameId, StoreMetadata store, CancellationToken ct = default);
/// <summary>
/// What the store's own file on the disk says of controller support (schema 0024, owner decision D163):
/// <c>full</c>, <c>partial</c> or <c>none</c>, the file it was read from and when. The UI's write - it reads the
/// store's file when a game's page is opened; never a hook column, and never a verdict of FrameLedger's. False when
/// no row has that id.
/// </summary>
ValueTask<bool> SetControllerSupportAsync(long gameId, string support, string source, DateTimeOffset at, CancellationToken ct = default);
}
@@ -52,12 +52,23 @@ public readonly record struct CaptureNotes(string? End, string? GuardReason, str
/// <summary>beta.14: a crash reporter the game started that did not count — the game kept running (<c>crash_reporter_seen=</c>).</summary>
public string? CrashReporterSeen { get; init; }
public static CaptureNotes Parse(string? notes)
/// <summary>
/// 0.1.0-beta.50 (owner decision D156): the session read nothing of controllers or of the keyboard and mouse
/// because the Privacy Policy that describes the reading was not accepted on the PC yet (<see cref="InputHeldSlot"/>).
/// False on every other session - one that read, one recorded with the option off, one from before the reading existed.
/// </summary>
public bool InputHeldForTerms { get; init; }
/// <summary>The slot of a session whose input reading waited for the terms (D156).</summary>
public const string InputHeldSlot = "input=terms_pending";
public static CaptureNotes Parse(string? notes) => string.IsNullOrWhiteSpace(notes)
? default
: Slots(notes) with { InputHeldForTerms = notes.Split(';').Any(static part => string.Equals(part.Trim(), InputHeldSlot, StringComparison.Ordinal)) };
/// <summary>The slots that carry a value, each by its prefix.</summary>
private static CaptureNotes Slots(string notes)
{
if (string.IsNullOrWhiteSpace(notes))
{
return default;
}
string? end = null, reason = null, family = null, signal = null, acException = null, scanAtExit = null, reporter = null, reporterSeen = null;
int? exitCode = null, launchError = null;
@@ -24,4 +24,17 @@ public sealed record RecorderOptions
/// nothing more than a session always did.
/// </summary>
public bool AdvancedMetrics { get; init; }
/// <summary>
/// Whether this session reads controllers and keyboard-and-mouse activity (owner decisions D155 and D156): the
/// option <c>capture.input_devices</c> is on AND the Privacy Policy that describes the reading has been accepted on
/// this PC. False - the default, and every recorder with no input reader - reads and stores nothing of it.
/// </summary>
public bool InputDevices { get; init; }
/// <summary>
/// The option is on and the reading is held back because the terms that describe it are not accepted yet (D156).
/// The session says so in its notes, so that "nothing was read" has a reason beside it.
/// </summary>
public bool InputHeldForTerms { get; init; }
}
@@ -118,6 +118,9 @@ public sealed class SessionRecorder : ISessionRecorder
}
}
/// <summary>The note of a session whose input reading waits for the terms (owner decision D156).</summary>
public const string InputHeldNote = "input: not read - the Privacy Policy that describes it is not accepted on this PC yet";
private async Task<RecordedSession> RecordStartedAsync(RecordRequest request, GameRow game, Guid guid, DateTimeOffset startedAt,
long qpcEpoch, long snapshotId, RecorderOptions options, CancellationToken ct)
{
@@ -151,6 +154,13 @@ public sealed class SessionRecorder : ISessionRecorder
using var writer = new PartialSessionWriter(_partials.Create(header), _clock, options.PartialFlushInterval);
var run = new Run(writer, poller, _clock, _observer, guid, advanced, request.NormalisedExePath);
writer.Note("started " + request.Mode);
if (options.InputHeldForTerms)
{
// D156: the option is on and nothing of controllers or of the keyboard and mouse is read, because the
// Privacy Policy that describes the reading has not been accepted on this PC yet.
writer.Note(InputHeldNote);
}
CaptureOutcome outcome = await RunLoopAsync(request, run, ct).ConfigureAwait(false);
DateTimeOffset endedAt = _clock.GetUtcNow();
await run.CompleteAdvancedAsync().ConfigureAwait(false);
@@ -213,7 +223,7 @@ public sealed class SessionRecorder : ISessionRecorder
bool crashEvent = hadPid && _crashes.FoundCrash(query);
ExitStatus exit = ExitStatusMapper.Map(outcome.Reason, outcome.ExitCode, crashEvent, reporterCounted);
SessionRow skeleton = Skeleton(header, outcome, endedAt, exit, new CrashWitness(crashEvent, reporter?.Image, reporterCounted), hooked) with { DriverProfileJson = driverProfile };
SessionRow skeleton = WithInputHeld(Skeleton(header, outcome, endedAt, exit, new CrashWitness(crashEvent, reporter?.Image, reporterCounted), hooked), options.InputHeldForTerms) with { DriverProfileJson = driverProfile };
var input = new FinalizeInput
{
Skeleton = skeleton,
@@ -263,6 +273,10 @@ public sealed class SessionRecorder : ISessionRecorder
};
}
/// <summary>D156: a session whose input reading waited for the terms says so in its stored notes, so the App can say why it has no input figures.</summary>
private static SessionRow WithInputHeld(SessionRow row, bool held) =>
held ? row with { CaptureNotes = row.CaptureNotes + "; " + CaptureNotes.InputHeldSlot } : row;
private static SessionRow Skeleton(PartialHeader h, CaptureOutcome o, DateTimeOffset endedAt, ExitStatus exit, CrashWitness crash, bool hooked)
{
string notes = ExitStatusMapper.Describe(o.Reason, o.ExitCode, crash.ApplicationLog, crash.Reporter, crash.ReporterCounted);
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Input;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Settings;
namespace FrameLedger.Application.Recording;
@@ -12,11 +14,23 @@ namespace FrameLedger.Application.Recording;
/// already under the product's) keeps its bound — the setting raises or lowers the product's rule, not the
/// operator's.
/// </summary>
/// <remarks>
/// <b>The input reading has a second condition</b> (owner decision D156): <c>capture.input_devices</c> is on unless
/// switched off, and the Agent may be recording before the App has shown the Privacy Policy that describes the
/// reading. So a session reads controllers and keyboard-and-mouse activity only when the accepted Privacy Policy is
/// that version or a later one (<see cref="InputTerms"/>). With no acceptance store given - an operator's console -
/// nothing can be shown to be accepted, and nothing is read.
/// </remarks>
public sealed class SettingsRecorderPolicy : IRecorderPolicy
{
private readonly RegisteredSettings _settings;
private readonly ILegalAcceptanceStore? _legal;
public SettingsRecorderPolicy(RegisteredSettings settings) => _settings = settings ?? throw new ArgumentNullException(nameof(settings));
public SettingsRecorderPolicy(RegisteredSettings settings, ILegalAcceptanceStore? legal = null)
{
_settings = settings ?? throw new ArgumentNullException(nameof(settings));
_legal = legal;
}
public async ValueTask<RecorderOptions> ResolveAsync(RecorderOptions baseline, CancellationToken ct = default)
{
@@ -25,6 +39,9 @@ public sealed class SettingsRecorderPolicy : IRecorderPolicy
int keep = await _settings.GetIntegerAsync(SettingsRegistry.RetentionRawSessionsPerGame, ct).ConfigureAwait(false);
int intervalMs = await _settings.GetIntegerAsync(SettingsRegistry.TelemetryIntervalMs, ct).ConfigureAwait(false);
bool advanced = await _settings.GetBooleanAsync(SettingsRegistry.TelemetryAdvanced, ct).ConfigureAwait(false);
bool input = await _settings.GetBooleanAsync(SettingsRegistry.CaptureInputDevices, ct).ConfigureAwait(false);
bool accepted = input && _legal is not null
&& InputTerms.Accepted((await _legal.FindAsync(InputTerms.PrivacyDocument, ct).ConfigureAwait(false))?.Version);
TimeSpan minimum = baseline.MinimumSessionLength < SessionFinalizer.MinimumSessionLength
? baseline.MinimumSessionLength
@@ -35,6 +52,8 @@ public sealed class SettingsRecorderPolicy : IRecorderPolicy
RetentionKeep = keep == 0 ? int.MaxValue : keep,
TelemetryInterval = TimeSpan.FromMilliseconds(intervalMs),
AdvancedMetrics = advanced,
InputDevices = accepted,
InputHeldForTerms = input && !accepted,
};
}
}
@@ -206,6 +206,22 @@ public static class SettingsRegistry
AgentReads = true,
};
/// <summary>
/// "Controllers and input" (owner decisions D155 and D156, 2026-11-14): whether the Agent reads, from outside the
/// game, which controllers are connected and in use, their batteries and the time of the last keyboard or mouse
/// input, and a session stores what it was played with (<c>21_INPUT_DEVICES</c>). <b>On by default</b> - and read
/// only once the Privacy Policy that describes it has been accepted on the PC (<c>Input.InputTerms</c>), which is
/// the recorder policy's to check, not this key's. Off means nothing is read or stored; a session recorded while
/// it was off is never filled in afterwards. Read at each session's start. Exactly "0" is off.
/// </summary>
public static readonly SettingDefinition CaptureInputDevices = new()
{
Key = "capture.input_devices",
Kind = SettingKind.Boolean,
Default = "1",
AgentReads = true,
};
/// <summary>FR-3.5: telemetry at 1 Hz, configurable 0.5–2 s. Milliseconds.</summary>
public static readonly SettingDefinition TelemetryIntervalMs = new()
{
@@ -284,7 +300,7 @@ public static class SettingsRegistry
public static IReadOnlyList<SettingDefinition> All { get; } =
[
UiLanguage, UiTheme, UiStartWithWindows, UiMinimizeToTray, UiHideAntiCheatHooking, UiFpsDecimals, UiHideScrollBars, UiLibraryView, UiPlayMode,
UiGameArt, UiGameArtTint, CaptureBackground, HookingKillSwitch, HookingUserModeExceptions, CaptureRunElevated, CaptureMinSessionSeconds, TelemetryIntervalMs, TelemetryAdvanced, RetentionRawSessionsPerGame,
UiGameArt, UiGameArtTint, CaptureBackground, HookingKillSwitch, HookingUserModeExceptions, CaptureRunElevated, CaptureMinSessionSeconds, CaptureInputDevices, TelemetryIntervalMs, TelemetryAdvanced, RetentionRawSessionsPerGame,
RetentionRemoveUninstalledGames, UpdateChannel, UpdateAutoCheck, PrivacyOnlineMetadata, LogDebug,
];
@@ -0,0 +1,51 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.Domain.Input;
/// <summary>
/// The libraries through which a Windows game reads controllers, by file name (owner decision D163,
/// <c>05_DETECTION</c> §Input libraries): the second of the three pieces of evidence for "supports controllers". A
/// hooked session's module snapshot notes which of them the game had loaded.
/// </summary>
/// <remarks>
/// <b>Loaded is not used.</b> Several engines load XInput whether the game reads a pad or not, so a library here says
/// how a game COULD read a controller - which is why it is shown as evidence, beside what the store lists and how the
/// game was played, and never as a verdict.
/// </remarks>
public static class InputLibraries
{
private static readonly (string File, string Api)[] _known =
[
("xinput1_4.dll", "XInput"),
("xinput1_3.dll", "XInput"),
("xinput9_1_0.dll", "XInput"),
("xinputuap.dll", "XInput"),
("dinput8.dll", "DirectInput"),
("dinput.dll", "DirectInput"),
("windows.gaming.input.dll", "Windows.Gaming.Input"),
("gameinput.dll", "GameInput"),
("sdl2.dll", "SDL"),
("sdl3.dll", "SDL"),
];
/// <summary>The file names a module snapshot looks for, lower case.</summary>
public static IReadOnlyList<string> FileNames { get; } = [.. _known.Select(static k => k.File)];
/// <summary>The interface a file is - <c>XInput</c>, <c>DirectInput</c>, <c>Windows.Gaming.Input</c>, <c>GameInput</c>, <c>SDL</c> - or null when it is not an input library.</summary>
public static string? ApiOf(string? fileName)
{
foreach ((string file, string api) in _known)
{
if (string.Equals(file, fileName, StringComparison.OrdinalIgnoreCase))
{
return api;
}
}
return null;
}
/// <summary>Whether a file is an input library.</summary>
public static bool Is(string? fileName) => ApiOf(fileName) is not null;
}
@@ -0,0 +1,292 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Buffers.Binary;
using System.Text;
namespace FrameLedger.Infrastructure.Import;
/// <summary>
/// What the Steam app's own file on this PC says of controller support for a game (owner decision D163,
/// <c>05_DETECTION</c> §What a store lists): <c>appcache\appinfo.vdf</c>, the copy of the store's application records
/// the Steam client keeps on the disk. <b>A local file: no request is made to any store</b> (CLAUDE.md rule 8).
/// </summary>
/// <remarks>
/// <para>
/// <b>One fact is read.</b> Each record's <c>common</c> section may hold <c>controller_support</c> = <c>full</c> or
/// <c>partial</c>; a record without it lists none. Nothing else of a record is kept, and nothing is written.
/// </para>
/// <para>
/// <b>The format, version 41</b> (magic <c>0x07564429</c>) - the one the Steam client has written since mid-2024, and
/// the only one read; another magic is refused with the reason, and the fact then reads N/A. A header: the magic, a
/// universe, and the offset of a table of strings. Then one record per application until an id of zero: the id, the
/// size of what follows, sixty bytes of state and hashes, and a tree in Valve's binary key-value form whose keys are
/// numbers into that table. The layout was checked on the developer's own Steam folder on 2026-11-14 (3 581 records,
/// every tree read to its last byte); the tests' files are written by hand to the same layout.
/// </para>
/// <para>
/// <b>It trusts no length in the file.</b> A record or a string that claims more than the file holds ends the read
/// with a reason; what was found before it is not returned either - a file that cannot be read whole says nothing.
/// </para>
/// </remarks>
public static class SteamAppInfo
{
/// <summary><c>games.controller_support_source</c> for a fact read here.</summary>
public const string Source = "steam-appinfo";
public const string Full = "full";
public const string Partial = "partial";
/// <summary>The store's record is there and lists no controller support.</summary>
public const string None = "none";
private const uint _magic41 = 0x07564429;
private const int _headerBytes = 16;
private const int _recordStateBytes = 60;
private const int _maxDepth = 32;
private const byte _map = 0x00;
private const byte _string = 0x01;
private const byte _wideString = 0x05;
private const byte _end = 0x08;
private const byte _endAlternate = 0x0B;
/// <summary>Where the Steam app on this PC keeps the file, or null when Steam is not installed for this user.</summary>
public static string? InstalledFile() => SteamLibrarySource.InstalledRoot() is { } root ? Path.Combine(root, "appcache", "appinfo.vdf") : null;
/// <summary>Reads the file at <paramref name="path"/>; a file that is not there, cannot be opened or cannot be read is a result with a <see cref="SteamAppInfoResult.Problem"/>.</summary>
public static SteamAppInfoResult ReadControllerSupport(string path, IReadOnlyCollection<uint> appIds)
{
ArgumentException.ThrowIfNullOrWhiteSpace(path);
ArgumentNullException.ThrowIfNull(appIds);
byte[] file;
try
{
// Steam rewrites the file while it runs: shared with every other reader and writer, and never locked.
using var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
if (stream.Length is 0 or > int.MaxValue)
{
return SteamAppInfoResult.Failed("the file is empty or too large");
}
file = new byte[stream.Length];
stream.ReadExactly(file);
}
catch (Exception e) when (e is IOException or UnauthorizedAccessException)
{
return SteamAppInfoResult.Failed(e.GetType().Name);
}
return ReadControllerSupport(file, appIds);
}
/// <summary>
/// For each of <paramref name="appIds"/> that has a record in <paramref name="file"/>: <see cref="Full"/>,
/// <see cref="Partial"/> or <see cref="None"/>. An id with no record is not in the answer: the store's file does
/// not describe it.
/// </summary>
public static SteamAppInfoResult ReadControllerSupport(ReadOnlySpan<byte> file, IReadOnlyCollection<uint> appIds)
{
ArgumentNullException.ThrowIfNull(appIds);
if (file.Length < _headerBytes)
{
return SteamAppInfoResult.Failed("shorter than a header");
}
uint magic = BinaryPrimitives.ReadUInt32LittleEndian(file);
if (magic != _magic41)
{
return SteamAppInfoResult.Failed($"format 0x{magic:X8} is not the one this build reads (0x{_magic41:X8})");
}
long tableAt = BinaryPrimitives.ReadInt64LittleEndian(file[8..]);
if (tableAt < _headerBytes || tableAt > file.Length - 4 || !TryFindKeys(file[(int)tableAt..], out int common, out int support))
{
return SteamAppInfoResult.Failed("the table of strings cannot be read");
}
var found = new Dictionary<uint, string>();
return ReadRecords(file[..(int)tableAt], [.. appIds], common, support, found) is { } problem
? SteamAppInfoResult.Failed(problem)
: new SteamAppInfoResult(found, Problem: null);
}
/// <summary>Walks the records, which end where the table of strings begins; returns what is wrong with them, or null.</summary>
private static string? ReadRecords(ReadOnlySpan<byte> records, HashSet<uint> wanted, int common, int support, Dictionary<uint, string> found)
{
int tableAt = records.Length;
int at = _headerBytes;
while (true)
{
if (at > tableAt - 4)
{
return "a record runs into the table of strings";
}
uint appId = BinaryPrimitives.ReadUInt32LittleEndian(records[at..]);
if (appId == 0)
{
return null;
}
if (at > tableAt - 8)
{
return "a record has no size";
}
uint size = BinaryPrimitives.ReadUInt32LittleEndian(records[(at + 4)..]);
if (size < _recordStateBytes || size > tableAt - at - 8)
{
return "a record claims more than the file holds";
}
if (wanted.Contains(appId))
{
ReadOnlySpan<byte> tree = records.Slice(at + 8 + _recordStateBytes, (int)size - _recordStateBytes);
if (!TryReadSupport(tree, common, support, out string? value))
{
return "a record's tree cannot be read";
}
found[appId] = string.Equals(value, Full, StringComparison.OrdinalIgnoreCase) ? Full
: string.Equals(value, Partial, StringComparison.OrdinalIgnoreCase) ? Partial
: None;
}
at += 8 + (int)size;
}
}
/// <summary>The numbers of the two keys in the table: <c>u32 count</c>, then that many strings, each ended by a zero.</summary>
private static bool TryFindKeys(ReadOnlySpan<byte> table, out int common, out int support)
{
common = -1;
support = -1;
uint count = BinaryPrimitives.ReadUInt32LittleEndian(table);
ReadOnlySpan<byte> rest = table[4..];
for (int i = 0; i < count; i++)
{
int end = rest.IndexOf((byte)0);
if (end < 0)
{
return false;
}
ReadOnlySpan<byte> name = rest[..end];
if (name.SequenceEqual("common"u8))
{
common = i;
}
else if (name.SequenceEqual("controller_support"u8))
{
support = i;
}
rest = rest[(end + 1)..];
}
// A table without one of the two is a file in which no record can say anything of controllers: still a file read.
return true;
}
/// <summary>The value of <c>&lt;root&gt;/common/controller_support</c>; false when the tree is not well formed.</summary>
private static bool TryReadSupport(ReadOnlySpan<byte> tree, int common, int support, out string? value)
{
value = null;
int at = 0;
return TryWalk(tree, ref at, depth: 0, inCommon: false, common, support, ref value);
}
private static bool TryWalk(ReadOnlySpan<byte> tree, ref int at, int depth, bool inCommon, int common, int support, ref string? value)
{
if (depth > _maxDepth)
{
return false;
}
while (true)
{
if (at >= tree.Length)
{
// The root has no end mark of its own when the record's size ends it; a nested map must have one.
return depth == 0;
}
byte kind = tree[at++];
if (kind is _end or _endAlternate)
{
return true;
}
if (tree.Length - at < 4)
{
return false;
}
int key = BinaryPrimitives.ReadInt32LittleEndian(tree[at..]);
at += 4;
if (kind == _map)
{
// depth 0 is the root's own map ("appinfo"); its child "common" is at depth 1.
if (!TryWalk(tree, ref at, depth + 1, inCommon: depth == 1 && key == common, common, support, ref value))
{
return false;
}
continue;
}
int start = at;
if (!TrySkipValue(tree, ref at, kind))
{
return false;
}
if (kind == _string && inCommon && key == support)
{
value = Encoding.UTF8.GetString(tree[start..(at - 1)]).Trim();
}
}
}
private static bool TrySkipValue(ReadOnlySpan<byte> tree, ref int at, byte kind)
{
switch (kind)
{
case _string:
int end = tree[at..].IndexOf((byte)0);
if (end < 0)
{
return false;
}
at += end + 1;
return true;
case _wideString:
while (true)
{
if (tree.Length - at < 2)
{
return false;
}
bool last = tree[at] == 0 && tree[at + 1] == 0;
at += 2;
if (last)
{
return true;
}
}
case 0x02 or 0x03 or 0x04 or 0x06:
at += 4;
return at <= tree.Length;
case 0x07 or 0x0A:
at += 8;
return at <= tree.Length;
default:
return false;
}
}
}
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.Infrastructure.Import;
/// <summary>What <see cref="SteamAppInfo"/> read.</summary>
/// <param name="Support">For each application asked about that has a record: <c>full</c>, <c>partial</c> or <c>none</c>. An id that is not here has no record in the file.</param>
/// <param name="Problem">Why the file could not be read, in a few words; null when it was. With a problem, <paramref name="Support"/> is empty.</param>
public sealed record SteamAppInfoResult(IReadOnlyDictionary<uint, string> Support, string? Problem)
{
public static SteamAppInfoResult Failed(string problem) => new(new Dictionary<uint, string>(), problem);
}
@@ -36,6 +36,11 @@ public sealed class SqliteGameRepository : IGameRepository
+ "ac_exception_lapsed_at, ac_exception_lapsed_reason, engine_version_source, ac_exception_trial_failed_at, "
+ "controller_support, controller_support_source, controller_support_at";
// Schema 0024 (D163): the store's word, read from its file on the disk. updated_at is not moved: nothing the user
// or the detection did changed.
private const string _setControllerSupport =
"UPDATE games SET controller_support = @support, controller_support_source = @source, controller_support_at = @at WHERE id = @id";
private const string _selectByPath = $"SELECT {_columns} FROM games WHERE exe_path = @path";
private const string _selectById = $"SELECT {_columns} FROM games WHERE id = @id";
@@ -234,6 +239,14 @@ public sealed class SqliteGameRepository : IGameRepository
_db.WriteAsync(async (c, tx, token) => await c.ExecuteAsync(new CommandDefinition(
_setRecording, new { id = gameId, record = record ? 1 : 0, now = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }, tx, cancellationToken: token)).ConfigureAwait(false) == 1, ct);
public ValueTask<bool> SetControllerSupportAsync(long gameId, string support, string source, DateTimeOffset at, CancellationToken ct = default)
{
ArgumentException.ThrowIfNullOrWhiteSpace(support);
ArgumentException.ThrowIfNullOrWhiteSpace(source);
return _db.WriteAsync(async (c, tx, token) => await c.ExecuteAsync(new CommandDefinition(
_setControllerSupport, new { id = gameId, support, source, at = at.ToUnixTimeMilliseconds() }, tx, cancellationToken: token)).ConfigureAwait(false) == 1, ct);
}
public ValueTask<bool> RemoveAsync(long gameId, bool keepSessions, CancellationToken ct = default) =>
_db.WriteAsync(async (c, tx, token) =>
{
@@ -4,6 +4,7 @@
using System.Collections.Concurrent;
using System.Diagnostics;
using FrameLedger.Application.Advanced;
using FrameLedger.Application.Input;
using FrameLedger.Application.Telemetry;
namespace FrameLedger.Infrastructure.Telemetry;
@@ -49,6 +50,12 @@ public sealed class TelemetryPoller : ITelemetryPoller
private IDisposable? _advancedHold;
private AdvancedSnapshot? _lastAdvanced;
// Controllers and input (owner decisions D155 and D156): the Agent's one reader, of which this poller opens a
// view for its session and reads it on every tick. Null when the option is off or its terms are not accepted.
private readonly IInputDevices? _input;
private IInputActivitySource? _inputView;
private volatile GameProcess? _followed;
private Thread? _thread;
private int _queued;
private long _dropped;
@@ -65,9 +72,11 @@ public sealed class TelemetryPoller : ITelemetryPoller
/// <param name="system">The machine beside the GPU, read on the same tick (2026-09-21); owned and disposed with <paramref name="source"/> when <paramref name="ownsSource"/> is set. Null composes none, and every sample's <see cref="TelemetrySample.System"/> is empty.</param>
/// <param name="game">The game process's own memory (beta.12, D43), read on the same tick for the process <see cref="Follow"/> named; owned and disposed with the others when <paramref name="ownsSource"/> is set. Null composes none, and every sample's <see cref="TelemetrySample.Game"/> is empty.</param>
/// <param name="advanced">The Agent's shared reader of advanced metrics (owner decision D101), held while this poller runs and never owned by it: each of its ticks is attached to one sample. Null - the option is off - composes none, and every sample's <see cref="TelemetrySample.Advanced"/> is null.</param>
/// <param name="input">The Agent's one input reader (owner decisions D155 and D156), never owned by this poller: a view of it is open while the poller runs, and what it saw since the last tick is attached to each sample. Null - the option is off, or its terms are not accepted - opens none, and every sample's <see cref="TelemetrySample.Input"/> is null.</param>
public TelemetryPoller(IGpuTelemetrySource source, TelemetryPollerOptions options, TimeProvider clock, bool ownsSource = false,
ISystemTelemetrySource? system = null, IGameMemorySource? game = null, IAdvancedHardware? advanced = null)
ISystemTelemetrySource? system = null, IGameMemorySource? game = null, IAdvancedHardware? advanced = null, IInputDevices? input = null)
{
_input = input;
_source = source ?? throw new ArgumentNullException(nameof(source));
_system = system;
_game = game;
@@ -107,6 +116,9 @@ public sealed class TelemetryPoller : ITelemetryPoller
// Held from here to Dispose: the shared reader runs while a session samples, and closes some seconds after
// the last session and the page have let go (D107).
_advancedHold = _advanced?.Acquire();
// The input reader runs from its first view to its last (D155): this session's view is open from here to Dispose.
_ = InputView();
_thread = new Thread(Loop)
{
IsBackground = true,
@@ -130,14 +142,16 @@ public sealed class TelemetryPoller : ITelemetryPoller
ProcessReading game = default;
bool measured = _game is not null && _game.TryRead(out game);
IReadOnlyList<AdvancedReading>? advanced = NewAdvancedReadings();
if (!gpu && !machine && !measured && advanced is null)
InputReading? played = null;
bool read = InputView() is { } view && view.TryRead(out played);
if (!gpu && !machine && !measured && advanced is null && !read)
{
return;
}
// A tick only the machine or the game answered still carries them: the placeholder names no layer and no field.
sample ??= new GpuSample { TakenAt = _clock.GetUtcNow(), Layer = TelemetryLayer.None };
_queue.Enqueue(new TelemetrySample(_clock.GetTimestamp(), sample, system, game, advanced));
_queue.Enqueue(new TelemetrySample(_clock.GetTimestamp(), sample, system, game, advanced, played));
if (Interlocked.Increment(ref _queued) > _options.QueueCapacity && _queue.TryDequeue(out _))
{
Interlocked.Decrement(ref _queued);
@@ -163,6 +177,25 @@ public sealed class TelemetryPoller : ITelemetryPoller
return snapshot.Readings.Count > 0 ? snapshot.Readings : null;
}
/// <summary>
/// This session's view of the input reader, opened where it is first needed - <see cref="Start"/> in the Agent, the
/// first tick where a test drives the poller without its thread - and told at once whose windows are the game's.
/// Null when no reader was composed: the option is off, or its terms are not accepted.
/// </summary>
private IInputActivitySource? InputView()
{
if (_inputView is null && _input is not null && !_disposed)
{
_inputView = _input.Open();
if (_followed is { } target)
{
_inputView.Follow(target);
}
}
return _inputView;
}
public bool FollowAdapter(ulong luid) => _source is IGpuAdapterSelector selector && selector.SelectAdapter(luid);
/// <summary>The game process whose memory the next ticks read (beta.12, D43); ignored without a game source.</summary>
@@ -170,6 +203,10 @@ public sealed class TelemetryPoller : ITelemetryPoller
{
ArgumentNullException.ThrowIfNull(target);
_game?.Follow(target);
// Whose windows count as this session's game (D155). Kept, so a view opened after this is told as well.
_followed = target;
_inputView?.Follow(target);
}
public int Drain(ICollection<TelemetrySample> into)
@@ -198,6 +235,7 @@ public sealed class TelemetryPoller : ITelemetryPoller
_thread?.Join(TimeSpan.FromSeconds(2));
_stop.Dispose();
_advancedHold?.Dispose();
_inputView?.Dispose();
if (_ownsSource)
{
_source.Dispose();
@@ -0,0 +1,255 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Buffers.Binary;
using System.Globalization;
using System.IO;
using System.Text;
using FluentAssertions;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Import;
using FrameLedger.Application.Persistence;
using FrameLedger.Domain.Sessions;
using FrameLedger.Infrastructure.Import;
namespace FrameLedger.App.Tests;
/// <summary>
/// "Does this game support controllers?" on the game's page (owner decision D163): three pieces of evidence, each with
/// where it comes from, and never a verdict - what the store's own file lists, which input libraries the game had
/// loaded, how it has been played. And where the store's word comes from: the Steam app's file on this PC, read when
/// the page opens, never in a viewer, never over the network.
/// </summary>
[Collection(StringsCultureCollection.Name)]
public sealed class ControllerEvidenceTests
{
private static readonly DateTimeOffset _t0 = new(2026, 11, 14, 12, 0, 0, TimeSpan.Zero);
private static CancellationToken Ct => TestContext.Current.CancellationToken;
private static SessionRow Session(long front = 0, long controller = 0, long keyboardMouse = 0, long both = 0, long idle = 0, bool hooked = true, string? modules = null) => new()
{
SessionGuid = Guid.NewGuid(),
GameId = 1,
SnapshotId = 1,
QpcEpoch = 0,
QpcFrequency = 10_000_000,
Mode = CaptureMode.Attach,
ExitStatus = ExitStatus.Normal,
StartedAt = _t0,
EndedAt = _t0.AddMinutes(10),
Tier = hooked ? CaptureTier.Hooked : CaptureTier.NotHooked,
RuntimeModulesJson = modules,
InputForegroundMs = front == 0 ? null : front,
InputControllerMs = front == 0 ? null : controller,
InputKeyboardMouseMs = front == 0 ? null : keyboardMouse,
InputBothMs = front == 0 ? null : both,
InputIdleMs = front == 0 ? null : idle,
};
private static GameRow Game(string? support) => new()
{
Id = 1,
Name = "A Game",
Fingerprint = new() { ExePath = @"C:\Games\A\a.exe", SizeBytes = 1, MtimeUnixMs = 1 },
HookEnabled = false,
HookCrashCount = 0,
AddedAt = _t0,
UpdatedAt = _t0,
ControllerSupport = support,
};
[Theory]
[InlineData("full", "Full - as Steam lists it")]
[InlineData("partial", "Partial - as Steam lists it")]
[InlineData("none", "Steam lists none")]
[InlineData(null, "N/A - no store file on this PC describes this game")]
[InlineData("a word a later release wrote", "N/A - no store file on this PC describes this game")]
public void TheStoresWordIsShownAsTheStoresAndItsAbsenceAsNotKnown(string? stored, string shown)
{
using var culture = new CultureScope("en");
ControllerEvidence.StoreText(Game(stored)).Should().Be(shown);
}
[Fact]
public void TheInputLibrariesAreThoseOfTheNewestSessionMeasuredFromInside()
{
using var culture = new CultureScope("en");
SessionRow[] sessions =
[
Session(hooked: false),
Session(modules: """{"nvngx_dlss.dll":"3.7.10.0","XINPUT1_4.dll":"10.0.26100.1","xinput9_1_0.dll":null,"SDL2.dll":"2.30.0.0"}"""),
Session(modules: """{"dinput8.dll":"10.0"}"""),
];
ControllerEvidence.LibrariesText(sessions).Should().Be("SDL (SDL2.dll)" + Environment.NewLine + "XInput (XINPUT1_4.dll, xinput9_1_0.dll)");
}
[Fact]
public void ASessionThatLoadedNoneSaysSoAndAGameNeverMeasuredFromInsideIsNotKnown()
{
using var culture = new CultureScope("en");
ControllerEvidence.LibrariesText([Session(modules: """{"nvngx_dlss.dll":"3.7.10.0"}""")]).Should().Be("None seen in the last session measured from inside");
ControllerEvidence.LibrariesText([Session(hooked: false, modules: """{"xinput1_4.dll":"1"}"""), Session(modules: null), Session(modules: "{ not json")])
.Should().Be("N/A - known only from a session measured from inside the game", "a session that was not hooked takes no snapshot, and one with none stored says nothing");
ControllerEvidence.LibrariesText([]).Should().Be("N/A - known only from a session measured from inside the game");
}
[Fact]
public void HowAGameWasPlayedIsTheSharesOfTheTimeInFrontOverEverySessionThatRecordedIt()
{
using var culture = new CultureScope("en");
SessionRow[] sessions =
[
Session(front: 600_000, controller: 500_000, keyboardMouse: 40_000, both: 10_000, idle: 50_000),
Session(),
Session(front: 400_000, controller: 330_000, keyboardMouse: 20_000, both: 0, idle: 50_000, hooked: false),
];
ControllerEvidence.PlayedWithText(sessions).Should().Be("Controller 83.0% · keyboard and mouse 6.0% · both 1.0% · no input 10.0% - of the time in front, over 2 sessions");
ControllerEvidence.PlayedWithText([sessions[0]]).Should().EndWith("over 1 session");
ControllerEvidence.PlayedWithText([Session(), Session(hooked: false)]).Should().Be("N/A - no session has recorded it yet");
ControllerEvidence.PlayedWithText([]).Should().Be("N/A - no session has recorded it yet");
}
/// <summary>The input libraries ride the session's module snapshot and are this page's to show: the summary's Libraries line stays what it was.</summary>
[Fact]
public void TheSessionsLibrariesLineLeavesTheInputLibrariesOut()
{
using var culture = new CultureScope("en");
SessionSummaryViewModel.LoadedLibraries("""{"nvngx_dlss.dll":"3.7.10.0","xinput1_4.dll":"10.0","SDL3.dll":"3.2"}""", [])
.Should().Contain("nvngx_dlss.dll").And.NotContain("xinput").And.NotContain("SDL3");
SessionSummaryViewModel.LoadedLibraries("""{"xinput1_4.dll":"10.0"}""", []).Should().BeNull("a session that loaded only input libraries has no Libraries line");
}
/// <summary>A file in Steam's format 41 with one record, for application 730, that lists <paramref name="support"/>.</summary>
private static string AppInfoFile(string directory, string? support)
{
string[] keys = ["appinfo", "common", "controller_support"];
byte[] Key(string name) => BitConverter.GetBytes(Array.IndexOf(keys, name));
byte[] value = support is null ? [] : [0x01, .. Key("controller_support"), .. Encoding.UTF8.GetBytes(support), 0];
byte[] tree = [0x00, .. Key("appinfo"), 0x00, .. Key("common"), .. value, 0x08, 0x08, 0x08];
byte[] records = [.. BitConverter.GetBytes(0x07564429u), .. BitConverter.GetBytes(1u), .. new byte[8],
.. BitConverter.GetBytes(730u), .. BitConverter.GetBytes((uint)(60 + tree.Length)), .. new byte[60], .. tree, .. BitConverter.GetBytes(0u)];
BinaryPrimitives.WriteInt64LittleEndian(records.AsSpan(8), records.Length);
string path = Path.Combine(directory, "appinfo.vdf");
File.WriteAllBytes(path, [.. records, .. BitConverter.GetBytes((uint)keys.Length), .. keys.SelectMany(static k => Encoding.UTF8.GetBytes(k).Append((byte)0))]);
return path;
}
private static StoreControllerSupport Reader(ScratchLedger s, string? file, bool viewer = false, params StoreGame[] installed) => new(
new StoreRecordsReader([new TestImages.Store("steam", [.. installed.Where(static g => string.Equals(g.Platform, "steam", StringComparison.Ordinal))]),
new TestImages.Store("gog", [.. installed.Where(static g => string.Equals(g.Platform, "gog", StringComparison.Ordinal))])]),
s.Games,
viewer ? new UiMode(IsViewer: true, Path.GetTempPath()) : UiMode.Profile,
() => file,
new FixedClock(_t0));
[Fact]
public async Task OpeningASteamGamesPageReadsWhatSteamsFileListsAndStoresIt()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
string folder = Directory.CreateTempSubdirectory("fl-steam-").FullName;
try
{
GameRow game = await s.GameAsync("Counter", Path.Combine(folder, "common", "Counter", "game.exe"));
var steam = new StoreGame("steam", "730", "Counter", Path.Combine(folder, "common", "Counter"), ExePath: null, Version: null);
StoreControllerSupport reader = Reader(s, AppInfoFile(folder, "partial"), viewer: false, steam);
GameRow read = await reader.RefreshAsync(game, Ct);
read.ControllerSupport.Should().Be("partial");
read.ControllerSupportSource.Should().Be(SteamAppInfo.Source);
read.ControllerSupportAt.Should().Be(_t0);
GameRow stored = (await s.Games.FindByIdAsync(game.Id, Ct))!;
stored.ControllerSupport.Should().Be("partial");
stored.ControllerSupportAt.Should().Be(_t0);
stored.UpdatedAt.Should().Be(game.UpdatedAt, "nothing the user or the detection did changed");
// Steam's record changes: the page follows it. The same answer again writes nothing.
GameRow again = await Reader(s, AppInfoFile(folder, null), viewer: false, steam).RefreshAsync(stored, Ct);
again.ControllerSupport.Should().Be("none", "Steam knows the game and lists no support");
(await Reader(s, AppInfoFile(folder, null), viewer: false, steam).RefreshAsync(again, Ct)).Should().BeSameAs(again);
}
finally
{
Directory.Delete(folder, recursive: true);
}
}
[Fact]
public async Task AGameNoSteamRecordOwnsAViewerAndAFileThatCannotBeReadLeaveTheRowAsItWas()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
string folder = Directory.CreateTempSubdirectory("fl-steam-").FullName;
try
{
string file = AppInfoFile(folder, "full");
GameRow game = await s.GameAsync("Counter", Path.Combine(folder, "common", "Counter", "game.exe"));
var steam = new StoreGame("steam", "730", "Counter", Path.Combine(folder, "common", "Counter"), ExePath: null, Version: null);
var gog = new StoreGame("gog", "730", "Counter", Path.Combine(folder, "common", "Counter"), ExePath: null, Version: null);
var other = new StoreGame("steam", "999", "Other", Path.Combine(folder, "common", "Counter"), ExePath: null, Version: null);
var named = new StoreGame("steam", "not-a-number", "Counter", Path.Combine(folder, "common", "Counter"), ExePath: null, Version: null);
(await Reader(s, file).RefreshAsync(game, Ct)).Should().BeSameAs(game, "no store installed it");
(await Reader(s, file, viewer: false, gog).RefreshAsync(game, Ct)).Should().BeSameAs(game, "another store's game: Steam's file is not asked about it");
(await Reader(s, file, viewer: false, other).RefreshAsync(game, Ct)).Should().BeSameAs(game, "Steam's file has no record of that application");
(await Reader(s, file, viewer: false, named).RefreshAsync(game, Ct)).Should().BeSameAs(game);
(await Reader(s, file, viewer: true, steam).RefreshAsync(game, Ct)).Should().BeSameAs(game, "a viewer reads nothing of this PC (D52)");
(await Reader(s, file: null, viewer: false, steam).RefreshAsync(game, Ct)).Should().BeSameAs(game, "Steam is not installed");
(await Reader(s, Path.Combine(folder, "absent.vdf"), viewer: false, steam).RefreshAsync(game, Ct)).Should().BeSameAs(game, "a file that cannot be read says nothing");
(await s.Games.FindByIdAsync(game.Id, Ct))!.ControllerSupport.Should().BeNull();
}
finally
{
Directory.Delete(folder, recursive: true);
}
}
[Fact]
public async Task TheGamesPageLoadsWithTheStoresWordAndWithoutAReaderAsBefore()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
string folder = Directory.CreateTempSubdirectory("fl-steam-").FullName;
try
{
GameRow game = await s.GameAsync("Counter", Path.Combine(folder, "common", "Counter", "game.exe"));
var steam = new StoreGame("steam", "730", "Counter", Path.Combine(folder, "common", "Counter"), ExePath: null, Version: null);
var library = new GameLibrary(s.Games, s.Sessions, s.Annotations, clock: null, Reader(s, AppInfoFile(folder, "full"), viewer: false, steam));
(await library.LoadAsync(game.Id, ct: Ct))!.Row.ControllerSupport.Should().Be("full");
(await s.Library.LoadAsync(game.Id, ct: Ct))!.Row.ControllerSupport.Should().Be("full", "it was stored, and a library with no reader shows what the row holds");
}
finally
{
Directory.Delete(folder, recursive: true);
}
}
private sealed class FixedClock(DateTimeOffset now) : TimeProvider
{
public override DateTimeOffset GetUtcNow() => now;
}
/// <summary>The strings' language and the numbers' culture, for the length of one test.</summary>
private sealed class CultureScope : IDisposable
{
private readonly CultureInfo? _strings = Strings.Culture;
private readonly CultureInfo _numbers = CultureInfo.CurrentCulture;
public CultureScope(string culture)
{
Strings.Culture = CultureInfo.GetCultureInfo(culture);
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(culture);
}
public void Dispose()
{
Strings.Culture = _strings;
CultureInfo.CurrentCulture = _numbers;
}
}
}
@@ -158,11 +158,11 @@ public sealed class FgMixPresentationTests
public void TheBarDrawsEachShareInProportionWithAGapBetweenTwoSegments()
{
FgMixSegment[] segments = [new(FgMixKind.Generated, 2.0, 0.25), new(FgMixKind.None, null, 0), new(FgMixKind.Generated, 4.0, 0.75)];
IReadOnlyList<Rect> rects = FgMixBar.Layout(segments, 400 + FgMixBar.Gap, 14);
IReadOnlyList<Rect> rects = FgMixBar.Layout(segments, 400 + ShareBar.Gap, 14);
rects[0].Should().Be(new Rect(0, 0, 100, 14));
rects[1].Width.Should().Be(0, "a share of nothing draws nothing and takes no gap");
rects[2].Should().Be(new Rect(100 + FgMixBar.Gap, 0, 300, 14));
rects[2].Should().Be(new Rect(100 + ShareBar.Gap, 0, 300, 14));
FgMixBar.Layout([new(FgMixKind.None, null, 1)], 12, 12).Should().Equal(new Rect(0, 0, 12, 12));
FgMixBar.Layout([new(FgMixKind.None, null, 0)], 100, 14).Should().OnlyContain(static r => r.Width == 0);
FgMixBar.Layout(segments, 0, 14).Should().OnlyContain(static r => r.Width == 0, "a bar not yet laid out");
@@ -787,7 +787,12 @@ public sealed class GameDetailViewModelTests
new GameDetailRow("Product version", "1.0.2"),
new GameDetailRow("Store", "Steam build 20374416"),
new GameDetailRow("Engine", "Unreal Engine 5.3"),
new GameDetailRow("Ships with", "DLSS: nvngx_dlss.dll 3.7.10.0" + Environment.NewLine + "XeSS: libxess.dll (no version)"));
new GameDetailRow("Ships with", "DLSS: nvngx_dlss.dll 3.7.10.0" + Environment.NewLine + "XeSS: libxess.dll (no version)"),
// 0.1.0-beta.50 (D163): the three pieces of evidence for "supports controllers" are always there, each
// saying what it knows - here, nothing yet.
new GameDetailRow("Controller support (store)", "N/A - no store file on this PC describes this game"),
new GameDetailRow("Input libraries loaded", "N/A - known only from a session measured from inside the game"),
new GameDetailRow("Usually played with", "N/A - no session has recorded it yet"));
vm.HookToggleEnabled.Should().BeFalse("turning hooking on could only be refused");
vm.NotX64Text.Should().Contain("32-bit (x86)");
@@ -797,7 +802,9 @@ public sealed class GameDetailViewModelTests
vm.HookToggleEnabled.Should().BeTrue("a switch that is on can be turned off whatever the file is");
(GameDetailViewModel unread, _, _, _, _) = await BuildAsync(s, fresh.Id);
unread.Details.Should().ContainSingle().Which.Should().Be(new GameDetailRow("Runs as", Strings.GameDetail_Details_NotRead));
// The file facts are one row; the three controller rows are there whether the files were read or not.
unread.Details.Should().HaveCount(4);
unread.Details[0].Should().Be(new GameDetailRow("Runs as", Strings.GameDetail_Details_NotRead));
unread.NotX64Text.Should().BeNull("not read is not known 32-bit");
unread.HookToggleEnabled.Should().BeTrue();
}
@@ -0,0 +1,367 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.IO;
using FluentAssertions;
using FrameLedger.App.Charts;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Input;
using FrameLedger.Infrastructure.Persistence;
namespace FrameLedger.App.Tests;
/// <summary>
/// A session's input series as the charts read them (0.1.0-beta.50): the series decoded with their gaps, the marks made
/// of them, the two charts, the marks on the frame-time chart, the summary's view model over a stored session, the two
/// trend metrics and the export's line. Over <see cref="InputFixtures"/> - synthetic; no controller was read.
/// </summary>
[Collection(StringsCultureCollection.Name)]
public sealed class InputChartsTests
{
private static CancellationToken Ct => TestContext.Current.CancellationToken;
private sealed class NoOverride : ITriStateOverridePrompt
{
public Task<TriStateOverrideChoice?> AskAsync(TriStateChipModel chip, CancellationToken ct = default) =>
Task.FromResult<TriStateOverrideChoice?>(null);
}
private sealed class NoSaver : IFileSaver
{
public string? PickSavePath(string filter, string suggestedName) => null;
}
private sealed class NoStrip : IMessageStrip
{
public void Info(string title, string body)
{
}
public void Success(string title, string body)
{
}
public void Warn(string title, string body)
{
}
}
private static SessionSummaryViewModel Summary(ScratchLedger s) =>
new(s.Sessions, s.Games, s.Annotations, new SqliteHardwareSnapshotRepository(s.Db), new SessionSeriesLoader(s.Sessions), new NoOverride(), new NoSaver(), new NoStrip());
[Fact]
public void TheSeriesAreDecodedOnTheSensorsClockWithTheirGapsKept()
{
InputSeries series = InputSeries.Decode(InputFixtures.Blobs())!;
series.TimesS.Should().Equal(0, 1, 2, 3, 4, 5, 6, 7);
series.Class.Take(6).Should().Equal(1f, 1f, 3f, 2f, 2f, 0f);
float.IsNaN(series.Class[6]).Should().BeTrue("the game was not in front in the seventh second, and that is kept");
series.Devices.Select(static d => d.Index).Should().Equal(1, 2);
series.Devices[0].Battery.Should().NotBeNull();
float.IsNaN(series.Devices[1].Active[0]).Should().BeTrue("the second controller was not connected yet");
InputSeries.Decode([]).Should().BeNull("a session that stored no input series has none to draw");
InputSeries.Decode([.. InputFixtures.Blobs().Where(static b => !string.Equals(b.Series, InputSessionBuilder.ClassSeries, StringComparison.Ordinal))])
.Should().BeNull();
// With no clock the stored rate is the fallback, as for every other series.
InputSeries.Decode([.. InputFixtures.Blobs().Skip(1)])!.TimesS.Should().Equal(0, 1, 2, 3, 4, 5, 6, 7);
}
[Fact]
public void TheMarksAreTheConnectionsTheDropsAndTheBatteriesThatFellToLow()
{
InputSeries series = InputSeries.Decode(InputFixtures.Blobs())!;
series.Events(InputFixtures.Record()).Should().Equal(
new InputEvent(2, InputEventKind.Connected, 2),
new InputEvent(4, InputEventKind.Disconnected, 2),
new InputEvent(5, InputEventKind.BatteryLow, 1),
new InputEvent(6, InputEventKind.Connected, 2),
new InputEvent(6, InputEventKind.BatteryLow, 2));
// The row counted one connection for a controller whose series rises twice: the first rise is the session's start.
InputDevicesRecord oneConnect = InputFixtures.Record() with { Devices = [.. InputFixtures.Record().Devices.Select(static d => d.Index == 2 ? d with { Connects = 1 } : d)] };
series.Events(oneConnect).Where(static e => e.Kind == InputEventKind.Connected).Should().Equal(new InputEvent(6, InputEventKind.Connected, 2));
// With no stored row: a controller there on the first tick did not connect, and no battery scale means no low mark.
series.Events(null).Select(static e => (e.TimeS, e.Kind, e.Device)).Should().Equal(
(2d, InputEventKind.Connected, 2), (4d, InputEventKind.Disconnected, 2), (6d, InputEventKind.Connected, 2));
}
[Fact]
public void AFlappingConnectionIsCappedAndAFourLevelBatteryIsDrawnAtThirds()
{
float[] flapping = [.. Enumerable.Range(0, 400).Select(static i => i % 2 == 0 ? float.NaN : 0f)];
var series = new InputSeries([.. Enumerable.Range(0, 400).Select(static i => (double)i)], new float[400], [new InputDeviceSeries(1, flapping, null)]);
series.Events(null).Should().HaveCount(InputSeries.MaxEvents, "a chart is not buried under its own marks; the table has the counts");
Enumerable.Range(0, 4).Select(static l => InputSeries.ToPercent(l, BatteryScale.FourLevels)).Should().Equal(0, 33, 67, 100);
InputSeries.ToPercent(57f, BatteryScale.Percent).Should().Be(57);
InputSeries.ToPercent(140f, BatteryScale.Percent).Should().Be(100);
}
[Fact]
public async Task TheTwoChartsDrawWhatTheSessionStoredAndSayWhenItStoredNothing()
{
InputSeries series = InputSeries.Decode(InputFixtures.Blobs())!;
IReadOnlyList<InputEvent> events = series.Events(InputFixtures.Record());
(int points, int marks, int empty, int lines, int noBattery) = await PagesLoadTests.OnStaAsync(() =>
{
var timeline = new InputTimelineChart();
timeline.Show(series, events);
int drawn = timeline.DrawnPoints;
int drawnMarks = timeline.DrawnEvents;
timeline.Show(null, []);
var battery = new InputBatteryChart();
battery.Show(series, InputFixtures.Record());
int drawnLines = battery.DrawnLines;
battery.Show(series, null);
return (drawn, drawnMarks, timeline.DrawnPoints, drawnLines, battery.DrawnLines);
});
points.Should().Be(7, "seven of the eight seconds had the game in front");
marks.Should().Be(5);
empty.Should().Be(0);
lines.Should().Be(2, "both controllers reported a battery");
noBattery.Should().Be(0, "without the stored scale a level cannot be put on the axis, so nothing is");
}
[Fact]
public async Task TheFrameTimeChartCarriesTheMarksOnlyWhereTheFramesPlaceOnTheClockIsKnown()
{
InputSeries input = InputSeries.Decode(InputFixtures.Blobs())!;
IReadOnlyList<InputEvent> events = input.Events(InputFixtures.Record());
SessionSeries Frames(double? offset) => new()
{
TimesS = [.. Enumerable.Range(0, 60).Select(static i => i * 0.1)],
FrameTimesMs = [.. Enumerable.Repeat(16.7f, 60)],
Generated = new bool[60],
Gap = new bool[60],
AppTimesS = [.. Enumerable.Range(0, 60).Select(static i => i * 0.1)],
AppFrameTimesMs = [.. Enumerable.Repeat(16.7, 60)],
AppPresentIndex = [.. Enumerable.Range(0, 60)],
Segments = [],
Sensors = [],
SensorsAligned = offset is not null,
SensorOffsetS = offset,
};
(int aligned, int shifted, int hidden, int unaligned) = await PagesLoadTests.OnStaAsync(() =>
{
var chart = new FrametimeChart();
chart.SetInputEvents(events, show: true);
chart.Show(Frames(0), displayed: false, sensors: false);
int atZero = chart.DrawnInputEvents;
chart.Show(Frames(3), displayed: false, sensors: false);
int fromThree = chart.DrawnInputEvents;
chart.SetInputEvents(events, show: false);
int off = chart.DrawnInputEvents;
chart.SetInputEvents(events, show: true);
chart.Show(Frames(null), displayed: false, sensors: false);
return (atZero, fromThree, off, chart.DrawnInputEvents);
});
aligned.Should().Be(3, "the frames last 5.9 s: the marks at 2 s, 4 s and 5 s are on the axis, the two at 6 s are past its end");
shifted.Should().Be(4, "with the first present three seconds in, the marks at 4, 5, 6 and 6 s are");
hidden.Should().Be(0);
unaligned.Should().Be(0, "a session that does not say where its frames sit on the sensors' clock draws no mark out of step");
}
[Fact]
public void TheGapNoteSpeaksOfTheMarksWhenTheyAreWhatRunsAhead()
{
CultureInfo? previous = Strings.Culture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
try
{
var series = new SessionSeries
{
TimesS = [0, 0.1, 0.2],
FrameTimesMs = [0, 16.7f, 0],
Generated = new bool[3],
Gap = [true, false, true],
AppTimesS = [0.1],
AppFrameTimesMs = [16.7],
AppPresentIndex = [1],
Segments = [],
Sensors = [],
SensorsAligned = true,
SensorOffsetS = 0,
};
FrametimeChart.NoteFor(series, displayed: false, sensors: false).Should().BeEmpty();
FrametimeChart.NoteFor(series, displayed: false, sensors: false, marks: true).Should().Contain("the controller marks run ahead");
FrametimeChart.NoteFor(series, displayed: false, sensors: true, marks: true).Should().Contain("the sensor lines run ahead").And.NotContain("controller marks");
}
finally
{
Strings.Culture = previous;
}
}
[Fact]
public async Task TheSummaryShowsTheBlockInBothTiersAndSaysWhyASessionHasNone()
{
CultureInfo? previous = Strings.Culture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
long hooked = await s.SessionWithFramesAsync(game.Id, DateTimeOffset.UtcNow, frames: 600, spikeEvery: 0, shape: InputFixtures.With, sensors: InputFixtures.BlobsWithSensors());
long tier2 = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-1), hooked: false, sensors: InputFixtures.Blobs(), shape: InputFixtures.With);
long older = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-2));
SessionSummaryViewModel vm = Summary(s);
await vm.LoadAsync(hooked, Ct);
vm.HasInput.Should().BeTrue();
vm.InputRows.Select(static r => r.Label).Should().Equal("Controller", "Keyboard and mouse", "Both at once", "No input");
vm.InputSegments.Should().HaveCount(4);
vm.InputName.Should().StartWith("Share of the time in front");
vm.InputControllers.Should().HaveCount(2);
vm.HasInputControllers.Should().BeTrue();
vm.InputNoControllers.Should().BeNull();
vm.InputMakers.Should().Contain("PlayStation 80.0%");
vm.InputNotes.Should().BeNull();
vm.InputMissing.Should().BeNull();
vm.HasInputCharts.Should().BeTrue();
vm.HasInputBattery.Should().BeTrue();
vm.InputEvents.Should().HaveCount(5);
vm.HasInputEvents.Should().BeTrue("the session has frames and says where they sit on the sensors' clock");
vm.ShowInputEvents.Should().BeTrue();
await vm.LoadAsync(tier2, Ct);
vm.HasInput.Should().BeTrue("what a session was played with is read from outside the game (D155): a session that was not hooked has it");
vm.InputControllers.Should().HaveCount(2);
vm.HasInputCharts.Should().BeTrue();
vm.HasInputEvents.Should().BeFalse("there is no frame-time chart to carry the marks; the input timeline has them");
await vm.LoadAsync(older, Ct);
vm.HasInput.Should().BeFalse();
vm.InputRows.Should().BeEmpty();
vm.HasInputControllers.Should().BeFalse();
vm.InputNoControllers.Should().BeNull("nothing was read, so nothing is said about controllers");
vm.HasInputCharts.Should().BeFalse();
vm.InputSeries.Should().BeNull();
vm.InputMissing.Should().StartWith("Not recorded for this session");
}
finally
{
Strings.Culture = previous;
}
}
[Fact]
public async Task ASessionReadWithNoControllerSaysNoneWasConnected()
{
CultureInfo? previous = Strings.Culture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
long id = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow, shape: static r => r with
{
InputObservedMs = 60_000,
InputForegroundMs = 60_000,
InputKeyboardMouseMs = 50_000,
InputIdleMs = 10_000,
InputControllerMs = 0,
InputBothMs = 0,
InputMethodSwitches = 0,
InputDevicesJson = InputDevicesRecord.ToJson(new InputDevicesRecord { Health = new Application.Input.InputHealth { RawInputRegistered = true, XInputAvailable = true, LastInputAvailable = true } }),
});
SessionSummaryViewModel vm = Summary(s);
await vm.LoadAsync(id, Ct);
vm.HasInput.Should().BeTrue();
vm.InputRows[1].Share.Should().Be("83.3%");
vm.HasInputControllers.Should().BeFalse();
vm.InputNoControllers.Should().Be("No controller was connected during this session.");
vm.InputMakers.Should().BeNull();
vm.HasInputCharts.Should().BeFalse("this row was written without its series");
}
finally
{
Strings.Culture = previous;
}
}
[Fact]
public void TheTwoTrendMetricsAreSharesOfTheTimeInFrontInEitherTier()
{
SessionRow hooked = InputFixtures.With(Row(Domain.Sessions.CaptureTier.Hooked));
SessionRow tier2 = InputFixtures.With(Row(Domain.Sessions.CaptureTier.NotHooked));
TrendSeriesBuilder.ValueOf(hooked, TrendMetric.ControllerShare).Should().BeApproximately(42.857, 0.001);
TrendSeriesBuilder.ValueOf(tier2, TrendMetric.KeyboardMouseShare).Should().BeApproximately(28.571, 0.001);
TrendSeriesBuilder.ValueOf(Row(Domain.Sessions.CaptureTier.Hooked), TrendMetric.ControllerShare).Should().BeNull("a session that recorded nothing has no point (FR-4.9)");
TrendSeriesBuilder.ValueOf(hooked with { InputForegroundMs = 0 }, TrendMetric.ControllerShare).Should().BeNull("the game was never in front");
TrendSeriesBuilder.Counts(tier2, TrendMetric.ControllerShare).Should().BeTrue();
TrendSeriesBuilder.IsInputMetric(TrendMetric.KeyboardMouseShare).Should().BeTrue();
TrendSeriesBuilder.IsInputMetric(TrendMetric.DisplayWindowedShare).Should().BeFalse();
TrendSeriesBuilder.IsPartial(hooked with { SettingsChangedMidSession = true }, TrendMetric.ControllerShare).Should().BeFalse("what a session was played with is the whole session's");
TrendSeriesBuilder.UnitOf(TrendMetric.ControllerShare).Should().StartWith("%");
}
[Fact]
public async Task TheCsvHeaderCarriesTheInputLineAndCompareHasTheTwoRows()
{
CultureInfo? previous = Strings.Culture;
CultureInfo previousCulture = CultureInfo.CurrentCulture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en");
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
long with = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow, hooked: false, shape: InputFixtures.With);
long without = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-1), hooked: false);
SessionRow played = (await s.Sessions.FindByIdAsync(with, Ct))!;
SessionRow bare = (await s.Sessions.FindByIdAsync(without, Ct))!;
using var writer = new StringWriter();
SessionExporter.WriteCsv(writer, played, game, null, [], null);
writer.ToString().Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries)
.Should().Contain(static l => l.StartsWith("# input: observed_ms 8000; foreground_ms 7000; controller_ms 3000;", StringComparison.Ordinal));
using var none = new StringWriter();
SessionExporter.WriteCsv(none, bare, game, null, [], null);
none.ToString().Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries).Should().Contain("# input: N/A");
// The JSON export is the stored row (Privacy Policy 3A): the totals and the controllers ride it as they are.
played.InputDevicesJson.Should().Contain("DualSense Wireless Controller").And.NotContainAny("serial", "address", "path");
InputPresentation.SharesText(played).Should().Be("Controller 42.9% · keyboard and mouse 28.6% · both 14.3% · no input 14.3%");
InputPresentation.SharesText(bare).Should().Be("N/A");
}
finally
{
Strings.Culture = previous;
CultureInfo.CurrentCulture = previousCulture;
}
}
private static SessionRow Row(Domain.Sessions.CaptureTier tier) => new()
{
SessionGuid = Guid.NewGuid(),
GameId = 1,
SnapshotId = 1,
StartedAt = DateTimeOffset.UnixEpoch,
EndedAt = DateTimeOffset.UnixEpoch.AddMinutes(10),
QpcEpoch = 0,
QpcFrequency = 1,
Tier = tier,
Mode = Domain.Sessions.CaptureMode.Launch,
ExitStatus = Domain.Sessions.ExitStatus.Normal,
FrameCount = 0,
FgMode = "na",
};
}
@@ -0,0 +1,105 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Input;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Infrastructure.Blobs;
namespace FrameLedger.App.Tests;
/// <summary>
/// Eight seconds of a session played with two controllers (0.1.0-beta.50), written as the recorder writes them: the
/// row's totals, <c>sessions.input_devices</c> and the <c>input.*</c> series. Synthetic - no controller was read to
/// make it, which is what every test over it can and cannot show.
/// </summary>
/// <remarks>
/// Second by second: a controller, a controller, both, keyboard and mouse twice, no input, the game not in front, a
/// controller. Controller 1 (a DualSense over Bluetooth) is there throughout and its battery falls from 40 % to 10 %
/// at the sixth second. Controller 2 (an Xbox pad on a wireless adapter) connects at the third second, drops at the
/// fifth, comes back at the seventh with its battery fallen from medium to low.
/// </remarks>
internal static class InputFixtures
{
private const float _n = float.NaN;
public static SensorBlob[] Blobs() =>
[
Blob("t_ms", SeriesCodec.EncodeFloat32([0f, 1000f, 2000f, 3000f, 4000f, 5000f, 6000f, 7000f])),
Blob(InputSessionBuilder.ClassSeries, SeriesCodec.EncodeSparseFloat32([1f, 1f, 3f, 2f, 2f, 0f, _n, 1f])),
Blob(InputSessionBuilder.ActiveSeries(1), SeriesCodec.EncodeSparseFloat32([1f, 1f, 1f, 0f, 0f, 0f, 0f, 1f])),
Blob(InputSessionBuilder.BatterySeries(1), SeriesCodec.EncodeSparseFloat32([40f, 40f, 40f, 30f, 20f, 10f, 10f, 10f])),
Blob(InputSessionBuilder.ActiveSeries(2), SeriesCodec.EncodeSparseFloat32([_n, _n, 0.5f, 0f, _n, _n, 0f, 0f])),
Blob(InputSessionBuilder.BatterySeries(2), SeriesCodec.EncodeSparseFloat32([_n, _n, 2f, 2f, _n, _n, 1f, 1f])),
];
/// <summary>The same with eight ticks of <c>gpu_temp</c>, for a session that has frames to draw them over.</summary>
public static SensorBlob[] BlobsWithSensors() =>
[.. Blobs(), Blob("gpu_temp", SeriesCodec.EncodeFloat32([60f, 61f, 62f, 63f, 64f, 65f, 66f, 67f]))];
public static InputDevicesRecord Record() => new()
{
Devices =
[
new InputDeviceRecord
{
Index = 1,
Family = "playstation",
VendorId = 0x054C,
ProductId = 0x0CE6,
Model = "DualSense Wireless Controller",
Connection = "bluetooth",
ConnectedMs = 8000,
ActiveMs = 4000,
Battery = new InputBatteryRecord
{
Scale = "percent",
States = [new InputBatteryStateRecord("discharging", 40, 3000), new InputBatteryStateRecord("discharging", 10, 3000)],
First = 40,
Last = 10,
DrainPercentPerHour = 13.5,
},
},
new InputDeviceRecord
{
Index = 2,
Family = "xbox",
VendorId = 0x045E,
ProductId = 0x0B12,
Model = "Xbox Wireless Controller",
Connection = "wireless",
XInputSlot = 0,
ConnectedMs = 4000,
ActiveMs = 500,
Connects = 2,
Disconnects = 1,
Battery = new InputBatteryRecord
{
Scale = "levels",
States = [new InputBatteryStateRecord("discharging", 2, 2000), new InputBatteryStateRecord("discharging", 1, 2000)],
First = 2,
Last = 1,
},
},
],
Families = [new InputFamilyRecord("playstation", 4000, 0.8), new InputFamilyRecord("xbox", 1000, 0.2)],
FamilySwitches = 2,
Health = new InputHealth { RawInputRegistered = true, XInputAvailable = true, LastInputAvailable = true, RawReports = 480, XInputReads = 60, Slices = 80 },
};
/// <summary>A row with the fixture's totals: read for 8 s, in front for 7 s - 3 s a controller, 2 s keyboard and mouse, 1 s both, 1 s nothing.</summary>
public static SessionRow With(SessionRow row) => row with
{
InputObservedMs = 8000,
InputForegroundMs = 7000,
InputControllerMs = 3000,
InputKeyboardMouseMs = 2000,
InputBothMs = 1000,
InputIdleMs = 1000,
InputMethodSwitches = 2,
InputSource = "rawinput+xinput+lastinput",
InputDevicesJson = InputDevicesRecord.ToJson(Record()),
};
private static SensorBlob Blob(string series, byte[] data) => new() { Series = series, Hz = 1, Codec = SeriesCodec.Tag, Data = data };
}
@@ -0,0 +1,257 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using FluentAssertions;
using FrameLedger.App.Charts;
using FrameLedger.App.Controls;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Input;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Input;
using FrameLedger.Domain.Sessions;
namespace FrameLedger.App.Tests;
/// <summary>
/// The summary's "Played with" block (0.1.0-beta.50, D155-D163): the row's stored totals as four rows and a bar, the
/// session's controllers with the battery state held longest, each maker's share, what the reader could not do, and why
/// a session has none - all over a synthetic session; no controller was read to make it.
/// </summary>
[Collection(StringsCultureCollection.Name)]
public sealed class InputPresentationTests
{
private static T In<T>(string culture, Func<T> f)
{
CultureInfo? previous = Strings.Culture;
CultureInfo previousCulture = CultureInfo.CurrentCulture;
try
{
Strings.Culture = CultureInfo.GetCultureInfo(culture);
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(culture);
return f();
}
finally
{
Strings.Culture = previous;
CultureInfo.CurrentCulture = previousCulture;
}
}
private static SessionRow Bare(CaptureTier tier = CaptureTier.Hooked, string? notes = null) => new()
{
SessionGuid = Guid.NewGuid(),
GameId = 1,
SnapshotId = 1,
StartedAt = DateTimeOffset.UnixEpoch,
EndedAt = DateTimeOffset.UnixEpoch.AddMinutes(10),
QpcEpoch = 0,
QpcFrequency = 1,
Tier = tier,
Mode = CaptureMode.Launch,
ExitStatus = ExitStatus.Normal,
FrameCount = tier == CaptureTier.Hooked ? 1000 : 0,
FgMode = "none",
CaptureNotes = notes,
};
private static SessionRow Played(CaptureTier tier = CaptureTier.Hooked) => InputFixtures.With(Bare(tier));
[Fact]
public void TheFourClassesAreRowsInTheBarsOrderEachWithItsShareOfTheTimeInFront() => In("en", () =>
{
IReadOnlyList<InputClassRowModel> rows = InputPresentation.Rows(Played());
rows.Select(static r => r.Label).Should().Equal("Controller", "Keyboard and mouse", "Both at once", "No input");
rows.Select(static r => r.Share).Should().Equal("42.9%", "28.6%", "14.3%", "14.3%");
rows.Select(static r => r.Duration).Should().Equal("0m 03s", "0m 02s", "0m 01s", "0m 01s");
rows.Select(static r => r.Segment.Class).Should().Equal(InputClass.Controller, InputClass.KeyboardMouse, InputClass.Both, InputClass.None);
rows.Sum(static r => r.Segment.Share).Should().BeApproximately(1, 1e-9, "the four classes are the whole time in front");
rows[0].Swatch.Should().Equal(new InputShareSegment(InputClass.Controller, 1));
rows[0].ToString().Should().Be("Controller: 42.9%, 0m 03s");
InputPresentation.AccessibleName(rows).Should().Be(
"Share of the time in front by what the game was played with: Controller 42.9%, Keyboard and mouse 28.6%, Both at once 14.3%, No input 14.3%");
InputPresentation.Context(Played()).Should().Be("Read for 0m 08s; the game was in front for 0m 07s. The shares are of the time in front.");
InputPresentation.Switches(Played()).Should().Be("Changes between a controller and the keyboard and mouse: 2");
InputPresentation.Missing(Played()).Should().BeNull();
return 0;
});
[Fact]
public void ATierTwoSessionHasTheSameBlock() => In("en", () =>
{
// Read from outside the game (D155): a session that was not hooked is played with something too.
InputPresentation.Rows(Played(CaptureTier.NotHooked)).Should().HaveCount(4);
InputPresentation.SharesText(Played(CaptureTier.NotHooked)).Should().Be("Controller 42.9% · keyboard and mouse 28.6% · both 14.3% · no input 14.3%");
return 0;
});
[Fact]
public void ASessionWithNoShareSaysWhy() => In("en", () =>
{
InputPresentation.Rows(Bare()).Should().BeEmpty();
InputPresentation.Context(Bare()).Should().BeNull();
InputPresentation.Switches(Bare()).Should().BeNull();
InputPresentation.SharesText(Bare()).Should().Be("N/A");
InputPresentation.ControllersText(Bare()).Should().Be("N/A");
InputPresentation.Missing(Bare()).Should().Be("Not recorded for this session: Settings ▸ Controllers and input was off, or the session is from before 0.1.0-beta.50.");
// Held because the Privacy Policy that describes the reading was not accepted yet (D156): the row says so.
InputPresentation.Missing(Bare(notes: "reason=x;" + CaptureNotes.InputHeldSlot))
.Should().Be("Not read in this session: the Privacy Policy that describes this reading had not been accepted on this PC yet.");
// Read, and the game never in front: no share is made up out of nothing.
SessionRow background = Bare() with { InputObservedMs = 5000, InputForegroundMs = 0, InputDevicesJson = InputDevicesRecord.ToJson(new InputDevicesRecord()) };
InputPresentation.Rows(background).Should().BeEmpty();
InputPresentation.Missing(background).Should().Be("Read, but the game's window was never in front while it was, so there is no share to show.");
InputPresentation.ControllersText(background).Should().Be("none");
return 0;
});
[Fact]
public void AControllerIsARowWithItsConnectionItsTimesItsEventsAndItsBattery() => In("en", () =>
{
IReadOnlyList<InputControllerRowModel> rows = InputPresentation.Controllers(InputFixtures.Record());
rows.Should().HaveCount(2);
rows[0].Should().Be(new InputControllerRowModel("DualSense Wireless Controller", "Bluetooth", "0m 04s", "0m 08s", "0 / 0",
"Longest: on battery at 40% for 0m 03s · 40% → 10% · 13.5% an hour"));
rows[1].Should().Be(new InputControllerRowModel("Xbox Wireless Controller", "Wireless adapter", "0m 00s", "0m 04s", "2 / 1",
"Longest: on battery at medium for 0m 02s · medium → low"));
rows[1].ToString().Should().Be("Xbox Wireless Controller: Wireless adapter, In use: 0m 00s, Connected: 0m 04s, Connected / dropped: 2 / 1, Battery: Longest: on battery at medium for 0m 02s · medium → low");
InputPresentation.Controllers(null).Should().BeEmpty();
InputPresentation.ControllersText(Played()).Should().Be("DualSense Wireless Controller (Bluetooth) · Xbox Wireless Controller (Wireless adapter)");
return 0;
});
[Fact]
public void AControllerWithNoModelIsNamedByItsMakerAndAPadAProgramPresentsSaysSo() => In("en", () =>
{
InputPresentation.ControllerName(new InputDeviceRecord { Family = "nintendo" }).Should().Be("Nintendo controller");
InputPresentation.ControllerName(new InputDeviceRecord { Family = "something-new" }).Should().Be("Other controller");
InputPresentation.ControllerName(new InputDeviceRecord { Family = "xbox", Model = "Steam Virtual Gamepad", Virtual = true })
.Should().Be("Steam Virtual Gamepad (a virtual pad a program presents)");
InputPresentation.ControllerName(new InputDeviceRecord { Family = "playstation", Model = "DualSense Wireless Controller", Remapped = true })
.Should().Be("DualSense Wireless Controller (also shown to games as an Xbox pad)");
InputPresentation.ConnectionLabel(ControllerConnection.Usb).Should().Be("USB");
InputPresentation.ConnectionLabel(ControllerConnection.Unknown).Should().Be("Unknown");
return 0;
});
[Fact]
public void ABatteryIsSaidInItsOwnScaleAndAWiredPadHasNone() => In("en", () =>
{
InputPresentation.BatteryText(null).Should().Be("N/A - no battery level was read");
InputPresentation.BatteryText(new InputBatteryRecord()).Should().Be("N/A - no battery level was read");
InputPresentation.BatteryText(new InputBatteryRecord { Scale = "none", States = [new InputBatteryStateRecord("wired", 0, 60_000)] })
.Should().Be("Longest: wired for 1m 00s", "a pad on its cable has no level: no span and no drain are made up for it");
InputPresentation.BatteryText(new InputBatteryRecord { Scale = "percent", States = [new InputBatteryStateRecord("charging", 85, 5000)], First = 80, Last = 90 })
.Should().Be("Longest: charging at 85% for 0m 05s · 80% → 90%");
InputPresentation.StateText(BatteryState.Full, BatteryScale.Percent, 100).Should().Be("full");
InputPresentation.StateText(BatteryState.Unknown, BatteryScale.None, 0).Should().Be("state unknown");
InputPresentation.StateText(BatteryState.Unknown, BatteryScale.FourLevels, 3).Should().Be("full");
Enumerable.Range(0, 4).Select(static l => InputPresentation.LevelText(BatteryScale.FourLevels, l)).Should().Equal("empty", "low", "medium", "full");
InputPresentation.LevelText(BatteryScale.None, 0).Should().Be("N/A");
return 0;
});
[Fact]
public void TwoMakersHaveSharesAndOneHasNothingToCompare() => In("en", () =>
{
InputPresentation.Makers(InputFixtures.Record()).Should().Be("By maker, of the time controllers were in use: PlayStation 80.0% · Xbox 20.0%. Changes of maker: 2.");
InputPresentation.Makers(InputFixtures.Record() with { Families = [new InputFamilyRecord("xbox", 1000, 1)] }).Should().BeNull();
InputPresentation.Makers(null).Should().BeNull();
return 0;
});
[Fact]
public void WhatTheReaderCouldNotDoIsSaid() => In("en", () =>
{
InputPresentation.Notes(InputFixtures.Record()).Should().BeEmpty("every source worked and Windows showed no pad twice");
InputPresentation.Notes(null).Should().BeEmpty();
InputDevicesRecord broken = InputFixtures.Record() with
{
VirtualPad = true,
Health = new InputHealth { RawInputRegistered = false, XInputAvailable = false, LastInputAvailable = false, Faults = 3 },
};
IReadOnlyList<string> notes = InputPresentation.Notes(broken);
notes.Should().HaveCount(5);
notes[0].Should().StartWith("Steam Input, or another remapper,");
notes[1].Should().StartWith("Windows did not accept the registration");
notes[2].Should().StartWith("XInput could not be read");
notes[3].Should().StartWith("Windows did not report the time of the last keyboard or mouse input");
notes[4].Should().Be("The reader faulted 3 time(s) in this session; the figures cover what it read.");
return 0;
});
[Theory]
[InlineData("en")]
[InlineData("vi")]
[InlineData("ja")]
public void TheExportLineIsTheSameInEveryLanguage(string culture) => In(culture, () =>
{
InputPresentation.ExportLine(Played()).Should().Be(
"observed_ms 8000; foreground_ms 7000; controller_ms 3000; keyboard_mouse_ms 2000; both_ms 1000; idle_ms 1000; method_switches 2; source rawinput+xinput+lastinput; "
+ "controller 1 playstation DualSense Wireless Controller bluetooth active_ms 4000 connected_ms 8000 connects 0 disconnects 0; "
+ "controller 2 xbox Xbox Wireless Controller wireless active_ms 500 connected_ms 4000 connects 2 disconnects 1");
InputPresentation.ExportLine(Bare()).Should().Be("N/A");
InputPresentation.ExportLine(Bare() with { InputObservedMs = 5000, InputForegroundMs = 0 })
.Should().Be("observed_ms 5000; foreground_ms 0; controller_ms 0; keyboard_mouse_ms 0; both_ms 0; idle_ms 0; method_switches 0; source n/a; controllers none");
return 0;
});
[Fact]
public void NoFigureOfTheBlockCanCarryAnIdentifier()
{
// What the ledger keeps of a controller is its maker, model, connection, times, counts and battery (21_INPUT_DEVICES):
// the row model has a column for each and for nothing else.
typeof(InputControllerRowModel).GetProperties().Select(static p => p.Name)
.Should().BeEquivalentTo("Name", "Connection", "InUse", "Connected", "Events", "Battery");
}
[Theory]
[InlineData("ChartPalette.Dark.xaml")]
[InlineData("ChartPalette.Light.xaml")]
public void TheFourClassesTakeFourRolesThatReadApartInEachTheme(string file)
{
ScottPlot.Color[] c = [.. Enumerable.Range(1, 16).Select(static i => ScottPlot.Color.FromARGB((uint)(0xFF000000 | i)))];
var p = new ChartPalette(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10], c[11], c[12], c[13], c[14], c[15]);
p.InputFill(InputClass.Controller).Should().Be(p.Native);
p.InputFill(InputClass.KeyboardMouse).Should().Be(p.Displayed);
p.InputFill(InputClass.Both).Should().Be(p.Sensor);
p.InputFill(InputClass.None).Should().Be(p.MixNone);
// The same bar the sensors' lines clear (beta.8): every pair of the four at least 60 apart in RGB.
Dictionary<string, (int R, int G, int B)> colours = Colours(file);
string[] roles = ["Chart_Native", "Chart_Displayed", "Chart_Sensor", "Chart_MixNone"];
foreach (string a in roles)
{
foreach (string b in roles.Where(r => string.CompareOrdinal(r, a) > 0))
{
(int R, int G, int B) m = colours[a];
(int R, int G, int B) n = colours[b];
Math.Sqrt(((m.R - n.R) * (m.R - n.R)) + ((m.G - n.G) * (m.G - n.G)) + ((m.B - n.B) * (m.B - n.B)))
.Should().BeGreaterThanOrEqualTo(60, $"{a} and {b} are two segments of one bar under {file}");
}
}
}
private static Dictionary<string, (int R, int G, int B)> Colours(string file)
{
string dir = AppContext.BaseDirectory;
while (!System.IO.File.Exists(System.IO.Path.Combine(dir, "FrameLedger.slnx")))
{
dir = System.IO.Path.GetDirectoryName(dir) ?? throw new InvalidOperationException("FrameLedger.slnx not found above the test binary");
}
System.Xml.Linq.XNamespace x = "http://schemas.microsoft.com/winfx/2006/xaml";
return System.Xml.Linq.XDocument.Load(System.IO.Path.Combine(dir, "src", "FrameLedger.App", "Styles", file))
.Root!.Elements().Where(e => e.Attribute(x + "Key") is not null).ToDictionary(
e => (string)e.Attribute(x + "Key")!,
static e => (Convert.ToInt32(e.Value.Substring(3, 2), 16), Convert.ToInt32(e.Value.Substring(5, 2), 16), Convert.ToInt32(e.Value.Substring(7, 2), 16)),
StringComparer.Ordinal);
}
}
@@ -3,6 +3,7 @@
using FluentAssertions;
using FrameLedger.App.Services;
using FrameLedger.Application.Input;
using FrameLedger.Shared;
namespace FrameLedger.App.Tests;
@@ -58,6 +59,22 @@ public sealed class LegalDocumentsTests
}
}
/// <summary>
/// D156: the Agent reads controllers and input only once the Privacy Policy that describes the reading has been
/// accepted. The Agent knows that document by a key and a version of its own; both must be the App's - the key
/// the Legal Gate stores an acceptance under, and a version the shipped document has reached.
/// </summary>
[Fact]
public void TheInputReadingsTermsAreThePrivacyPolicyThisBuildShips()
{
InputTerms.PrivacyDocument.Should().Be(LegalDocuments.Privacy);
LegalDocument privacy = LegalDocuments.Load(BuildLine.Main).Single(static d => string.Equals(d.Key, LegalDocuments.Privacy, StringComparison.Ordinal));
InputTerms.Accepted(privacy.Version).Should().BeTrue(
"accepting the document this build shows must be enough for the reading it describes; shipped is " + privacy.Version);
privacy.Text.Should().Contain("Controllers and input", "the document the reading waits for is the one that describes it");
}
[Fact]
public void TheVersionLineIsTheDocumentsOwn()
{
@@ -156,7 +156,7 @@ public sealed partial class MarkdownRendererTests
return problems;
});
documents.Should().HaveCount(25, "eleven documents and the guide's fourteen pages");
documents.Should().HaveCount(26, "eleven documents and the guide's fifteen pages");
missing.Should().BeEmpty("the renderer must never shorten a document a user reads or accepts");
}
@@ -86,7 +86,10 @@ public sealed partial class PagesLoadTests
]))!;
// Advanced metrics (D101): a session recorded with the option on, so the page's Session tab has facts, statistics and a chart.
await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-2), sensors: AdvancedFixtures.Blobs(), advanced: AdvancedFixtures.Row()).ConfigureAwait(false);
long withFrames = await s.SessionWithFramesAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-5), frames: 600, spikeEvery: 200, shape: r => r with { FgMixJson = mix }).ConfigureAwait(false);
long withFrames = await s.SessionWithFramesAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-5), frames: 600, spikeEvery: 200,
// 0.1.0-beta.50: and what it was played with - two controllers, their batteries - so the "Played with" block, its bar and its
// two charts are drawn and read in both themes too.
shape: r => InputFixtures.With(r with { FgMixJson = mix }), sensors: InputFixtures.BlobsWithSensors()).ConfigureAwait(false);
var surfaces = new Surfaces(s);
await surfaces.LoadPagesAsync(game.Id).ConfigureAwait(false);
surfaces.Summary = new SessionSummaryViewModel(s.Sessions, s.Games, s.Annotations, new SqliteHardwareSnapshotRepository(s.Db),
+4 -3
View File
@@ -92,8 +92,9 @@ internal sealed class ScratchLedger : IAsyncDisposable
new SensorBlob { Series = "gpu_power", Hz = 1, Codec = Infrastructure.Blobs.SeriesCodec.Tag, Data = Infrastructure.Blobs.SeriesCodec.EncodeFloat32([150, 160, 170]) },
]);
/// <summary>A hooked session WITH blobs: <paramref name="frames"/> presents at 60 fps, a 4× spike every <paramref name="spikeEvery"/> frames, one segment, a gpu_temp series.</summary>
public async Task<long> SessionWithFramesAsync(long gameId, DateTimeOffset startedAt, int frames, int spikeEvery, Func<SessionRow, SessionRow>? shape = null)
/// <summary>A hooked session WITH blobs: <paramref name="frames"/> presents at 60 fps, a 4× spike every <paramref name="spikeEvery"/> frames, one segment, a gpu_temp series - or <paramref name="sensors"/>, the session's own sensor blobs with their own <c>t_ms</c>, in place of those three ticks.</summary>
public async Task<long> SessionWithFramesAsync(long gameId, DateTimeOffset startedAt, int frames, int spikeEvery, Func<SessionRow, SessionRow>? shape = null,
IReadOnlyList<SensorBlob>? sensors = null)
{
long snapshotId = await new SqliteHardwareSnapshotRepository(Db).EnsureAsync(new HardwareSnapshot { GpuName = "G" }, startedAt, TestContext.Current.CancellationToken).ConfigureAwait(false);
float[] frametimes = new float[frames];
@@ -122,7 +123,7 @@ internal sealed class ScratchLedger : IAsyncDisposable
FrameIndex = Infrastructure.Blobs.SeriesCodec.EncodeUInt32(index),
FirstPresentMs = 0, // schema 0013: the frames and the sensors share a zero, so the overlay is drawn
},
Sensors =
Sensors = sensors ??
[
new SensorBlob { Series = "t_ms", Hz = 1, Codec = Infrastructure.Blobs.SeriesCodec.Tag, Data = Infrastructure.Blobs.SeriesCodec.EncodeFloat32([0, 1000, 2000]) },
new SensorBlob { Series = "gpu_temp", Hz = 1, Codec = Infrastructure.Blobs.SeriesCodec.Tag, Data = Infrastructure.Blobs.SeriesCodec.EncodeFloat32([60, 61, 62]) },
@@ -448,6 +448,32 @@ public sealed class SettingsViewModelTests
}
}
[Fact]
public async Task ControllersAndInputIsOnByDefaultAndItsToggleIsPersisted()
{
// Owner decisions D155 and D156 (2026-11-14): capture.input_devices, default 1. The Agent reads it at the next
// session's start - and uses it only once the terms that describe the reading are accepted, which is not the
// page's to decide.
await using ScratchLedger s = await ScratchLedger.OpenAsync();
Harness h = await OpenAsync(s);
h.Vm.InputDevices.Should().BeTrue("on unless switched off");
(await h.Settings.GetBooleanAsync(SettingsRegistry.CaptureInputDevices, Ct)).Should().BeTrue();
h.Vm.InputDevices = false;
Task off = h.Vm.Pending;
await off;
(await h.Settings.GetBooleanAsync(SettingsRegistry.CaptureInputDevices, Ct)).Should().BeFalse();
Harness reopened = await OpenAsync(s);
reopened.Vm.InputDevices.Should().BeFalse("the page shows what the row holds");
reopened.Vm.InputDevices = true;
Task on = reopened.Vm.Pending;
await on;
(await reopened.Settings.GetBooleanAsync(SettingsRegistry.CaptureInputDevices, Ct)).Should().BeTrue();
}
[Fact]
public async Task AdvancedMetricsIsOffByDefaultAndItsToggleIsPersisted()
{
@@ -155,6 +155,7 @@ public sealed class ViewerModeTests
[SettingsRegistry.HookingUserModeExceptions.Key] = ("IsChecked", "UserModeExceptions, Mode=TwoWay"),
[SettingsRegistry.CaptureRunElevated.Key] = ("IsChecked", "RunElevated, Mode=TwoWay"),
[SettingsRegistry.CaptureMinSessionSeconds.Key] = ("Value", "MinSessionSeconds, Mode=TwoWay"),
[SettingsRegistry.CaptureInputDevices.Key] = ("IsChecked", "InputDevices, Mode=TwoWay"),
[SettingsRegistry.TelemetryIntervalMs.Key] = ("Value", "TelemetryIntervalMs, Mode=TwoWay"),
[SettingsRegistry.TelemetryAdvanced.Key] = ("IsChecked", "AdvancedMetrics, Mode=TwoWay"),
[SettingsRegistry.RetentionRawSessionsPerGame.Key] = ("Value", "RetentionRawSessions, Mode=TwoWay"),
@@ -127,6 +127,20 @@ internal sealed class FakeGameRepository : IGameRepository
public ValueTask<bool> RemoveAsync(long gameId, bool keepSessions, CancellationToken ct = default) => throw new NotSupportedException();
/// <summary>The UI's recording switch (2026-09-23), applied to the row so the watcher tests see it.</summary>
public ValueTask<bool> SetControllerSupportAsync(long gameId, string support, string source, DateTimeOffset at, CancellationToken ct = default)
{
foreach ((string key, GameRow row) in Rows)
{
if (row.Id == gameId)
{
Rows[key] = row with { ControllerSupport = support, ControllerSupportSource = source, ControllerSupportAt = at };
return ValueTask.FromResult(true);
}
}
return ValueTask.FromResult(false);
}
public ValueTask<bool> SetRecordingAsync(long gameId, bool record, CancellationToken ct = default)
{
foreach ((string key, GameRow row) in Rows)
@@ -328,7 +328,7 @@ public sealed class SessionRecorderTests : IAsyncDisposable
private async Task<Harness> MakeAsync(bool consented = true, AntiCheatVerdict? verdict = null, int records = 3_000, FakeLiveness? liveness = null, bool poller = true,
bool clockStepsOnDrain = false, IDriverProfileSource? profiles = null, bool excepted = false, IDisplayProbe? display = null, ulong adapterLuid = 0,
AntiCheatVerdict? rescan = null, ICrashReporterSightings? reporters = null, IAdvancedHardware? advanced = null, bool advancedOn = false,
AntiCheatVerdict? rescan = null, ICrashReporterSightings? reporters = null, IAdvancedHardware? advanced = null, bool advancedOn = false, bool inputHeld = false,
InGameScript? inGame = null)
{
_db ??= await LedgerDatabase.OpenAsync(Path.Combine(_dir, LedgerPaths.DatabaseFileName), ct: TestContext.Current.CancellationToken).ConfigureAwait(false);
@@ -359,7 +359,7 @@ public sealed class SessionRecorderTests : IAsyncDisposable
games, new FakeSnapshots(), new FixedHardware(), partials,
new SessionFinalizer(sessions, new RawSeriesCodec()), new NoCrashEvents(),
_ => fakePoller, clock,
new RecorderOptions { PartialFlushInterval = TimeSpan.FromSeconds(10), MinimumSessionLength = SteppingClock.Step, AdvancedMetrics = advancedOn }, profiles: profiles,
new RecorderOptions { PartialFlushInterval = TimeSpan.FromSeconds(10), MinimumSessionLength = SteppingClock.Step, AdvancedMetrics = advancedOn, InputHeldForTerms = inputHeld }, profiles: profiles,
exceptionLapse: new UserModeExceptionLapsePolicy(store, sessions), reporters: reporters, advanced: advanced);
return new Harness { Recorder = recorder, Games = games, Sessions = sessions, Partials = partials, Clock = clock, Store = store, Poller = fakePoller };
}
@@ -811,6 +811,28 @@ public sealed class SessionRecorderTests : IAsyncDisposable
}
}
/// <summary>
/// D156: with the option on and the Privacy Policy that describes the reading not accepted yet, the session reads
/// nothing of controllers or of the keyboard and mouse - and says so, so that "nothing was read" has its reason
/// beside it. A session that was not held back says nothing.
/// </summary>
[Theory]
[InlineData(true)]
[InlineData(false)]
public async Task ASessionWhoseInputReadingWaitsForTheTermsSaysSoInItsNotes(bool held)
{
Harness h = await MakeAsync(inputHeld: held);
RecordedSession r = await h.Recorder.RecordAsync(Request(), TestContext.Current.CancellationToken);
h.Partials.Created[r.Row.SessionGuid].Notes.Count(static n => string.Equals(n.Text, SessionRecorder.InputHeldNote, StringComparison.Ordinal))
.Should().Be(held ? 1 : 0);
SessionRow row = h.Sessions.Stored.Single().Row;
row.InputObservedMs.Should().BeNull("nothing was read either way: the harness composes no input reader");
CaptureNotes.Parse(row.CaptureNotes).InputHeldForTerms.Should().Be(held, "the stored notes say it, where the App reads it");
CaptureNotes.Parse(row.CaptureNotes).End.Should().NotBeNullOrEmpty("the slot is added to the notes, not put in their place");
}
[Fact]
public async Task WithAdvancedMetricsOffTheSharedReaderIsNeverHeldAndTheSessionStoresNothingOfThem()
{
@@ -2,6 +2,7 @@
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FluentAssertions;
using FrameLedger.Application.Input;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Application.Settings;
@@ -98,4 +99,81 @@ public sealed class RegisteredSettingsTests
RecorderOptions bounded = await policy.ResolveAsync(baseline with { MinimumSessionLength = TimeSpan.FromSeconds(8) }, Ct);
bounded.MinimumSessionLength.Should().Be(TimeSpan.FromSeconds(8));
}
/// <summary>
/// D156: controllers and input are read when the option is on - it is, unless switched off - AND the Privacy
/// Policy that describes the reading has been accepted on this PC. The Agent starts at logon, before the App has
/// shown a new document; until it has, a session reads nothing and says why.
/// </summary>
[Theory]
[InlineData(null, null, false, true)] // nothing accepted yet
[InlineData(null, "2.21", false, true)] // the version before the one that describes it
[InlineData(null, "2.22", true, false)]
[InlineData(null, "2.30", true, false)]
[InlineData(null, "3.0", true, false)]
[InlineData("1", "2.22", true, false)]
[InlineData("0", "2.22", false, false)] // switched off: not read, and not "held"
[InlineData("0", null, false, false)]
[InlineData("yes", "2.22", true, false)] // a row that is not 0 or 1 reads as the default, which is on
public async Task TheInputReadingNeedsTheOptionOnAndTheTermsThatDescribeItAccepted(string? row, string? accepted, bool reads, bool held)
{
var store = new MemoryStore();
if (row is not null)
{
store.Rows["capture.input_devices"] = row;
}
var legal = new MemoryAcceptance();
if (accepted is not null)
{
await legal.RecordAsync(new LegalAcceptance(InputTerms.PrivacyDocument, accepted, DateTimeOffset.UnixEpoch), Ct);
}
RecorderOptions options = await new SettingsRecorderPolicy(new RegisteredSettings(store), legal).ResolveAsync(new RecorderOptions(), Ct);
options.InputDevices.Should().Be(reads);
options.InputHeldForTerms.Should().Be(held);
}
[Fact]
public async Task WithNoAcceptanceStoreNothingCanBeShownAcceptedAndNothingIsRead()
{
RecorderOptions options = await new SettingsRecorderPolicy(new RegisteredSettings(new MemoryStore())).ResolveAsync(new RecorderOptions(), Ct);
options.InputDevices.Should().BeFalse("an operator's console has no Legal Gate behind it");
options.InputHeldForTerms.Should().BeTrue();
}
[Theory]
[InlineData("2.22", true)]
[InlineData("2.23", true)]
[InlineData("2.100", true)] // compared as numbers: 100 is after 22
[InlineData("3.0", true)]
[InlineData(" 2.22 ", true)]
[InlineData("2.21", false)]
[InlineData("2.9", false)] // 9 is before 22
[InlineData("1.99", false)]
[InlineData("2", false)]
[InlineData("2.22.1", false)]
[InlineData("two", false)]
[InlineData("-2.22", false)]
[InlineData("", false)]
[InlineData(null, false)]
public void TheTermsAreAcceptedFromTheVersionThatFirstDescribedTheReading(string? version, bool accepted) =>
InputTerms.Accepted(version).Should().Be(accepted);
private sealed class MemoryAcceptance : ILegalAcceptanceStore
{
private readonly Dictionary<string, LegalAcceptance> _rows = new(StringComparer.Ordinal);
public ValueTask<LegalAcceptance?> FindAsync(string document, CancellationToken ct = default) => ValueTask.FromResult(_rows.GetValueOrDefault(document));
public ValueTask<IReadOnlyList<LegalAcceptance>> ListAsync(CancellationToken ct = default) => ValueTask.FromResult<IReadOnlyList<LegalAcceptance>>([.. _rows.Values]);
public ValueTask RecordAsync(LegalAcceptance acceptance, CancellationToken ct = default)
{
_rows[acceptance.Document] = acceptance;
return ValueTask.CompletedTask;
}
}
}
@@ -80,8 +80,10 @@ public sealed class SettingsRegistryTests
// capture.background left in beta.12: it was listed here and no Agent code ever read it; the key is reserved.
// retention.remove_uninstalled_games joined in beta.19 (D55): the detection sweep reads it at every pass.
// telemetry.advanced joined on 2026-11-11 (D101): Advanced metrics, off by default, read at each session's start.
// capture.input_devices joined on 2026-11-14 (D155, D156): controllers and input, on by default, read at each
// session's start - and used only once the terms that describe it are accepted, which is the policy's to check.
agent.Should().BeEquivalentTo(["hooking.kill_switch", "hooking.usermode_ac_exceptions", "capture.run_elevated",
"capture.min_session_s", "telemetry.interval_ms", "telemetry.advanced", "retention.raw_sessions_per_game", "retention.remove_uninstalled_games"]);
"capture.min_session_s", "capture.input_devices", "telemetry.interval_ms", "telemetry.advanced", "retention.raw_sessions_per_game", "retention.remove_uninstalled_games"]);
agent.Should().OnlyContain(static k => k.StartsWith("hooking.", StringComparison.Ordinal) || k.StartsWith("capture.", StringComparison.Ordinal)
|| k.StartsWith("telemetry.", StringComparison.Ordinal) || k.StartsWith("retention.", StringComparison.Ordinal));
}
@@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FluentAssertions;
using FrameLedger.Domain.Input;
namespace FrameLedger.Domain.Tests.Input;
/// <summary>The libraries through which a Windows game reads controllers, by file name (owner decision D163).</summary>
public sealed class InputLibrariesTests
{
[Theory]
[InlineData("xinput1_4.dll", "XInput")]
[InlineData("XINPUT1_3.DLL", "XInput")]
[InlineData("xinput9_1_0.dll", "XInput")]
[InlineData("xinputuap.dll", "XInput")]
[InlineData("dinput8.dll", "DirectInput")]
[InlineData("DINPUT.dll", "DirectInput")]
[InlineData("Windows.Gaming.Input.dll", "Windows.Gaming.Input")]
[InlineData("GameInput.dll", "GameInput")]
[InlineData("SDL2.dll", "SDL")]
[InlineData("SDL3.dll", "SDL")]
public void AnInputLibraryIsNamedByTheInterfaceItIs(string file, string api)
{
InputLibraries.ApiOf(file).Should().Be(api);
InputLibraries.Is(file).Should().BeTrue();
}
[Theory]
[InlineData("nvngx_dlss.dll")]
[InlineData("xinput.dll")]
[InlineData("hid.dll")] // loaded by half of Windows: it says nothing of controllers
[InlineData("steam_api64.dll")]
[InlineData("")]
[InlineData(null)]
public void AnythingElseIsNotOne(string? file)
{
InputLibraries.ApiOf(file).Should().BeNull();
InputLibraries.Is(file).Should().BeFalse();
}
[Fact]
public void TheNamesASnapshotLooksForAreLowerCaseAndEachIsAnInputLibrary()
{
InputLibraries.FileNames.Should().HaveCount(10).And.OnlyHaveUniqueItems();
InputLibraries.FileNames.Should().OnlyContain(static f => InputLibraries.Is(f) && !f.Any(char.IsUpper));
}
}
Loaded 100 of 105 files, more files were not shown because too many files have changed in this diff. Show more