Compare commits
29
Commits
main
...
feat/input-ui
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
465c1c2c63 | ||
|
|
52939c3456 | ||
|
|
d414bb6747 | ||
|
|
83cdceef8f | ||
|
|
8e9dc000b0 | ||
|
|
e91f99279c | ||
|
|
1c261e950a | ||
|
|
784fbb5399 | ||
|
|
e364f95166 | ||
|
|
a7ee7fd8ed | ||
|
|
30f064874e | ||
|
|
cd7ed8bf00 | ||
|
|
9afbeb6801 | ||
|
|
0378b7dfa2 | ||
|
|
26b4b3ccb6 | ||
|
|
7dbb3c573a | ||
|
|
102dcdd3f1 | ||
|
|
ac360eae01 | ||
|
|
43e0c2b347 | ||
|
|
b579133128 | ||
|
|
f7129807e6 | ||
|
|
be96564a8f | ||
|
|
e24f09ae8a | ||
|
|
80155d7638 | ||
|
|
8b4cccbb25 | ||
|
|
2dd0e4f271 | ||
|
|
e2675cd91c | ||
|
|
dca740e94b | ||
|
|
b29993ba82 |
No files matched your search
+7
-1
@@ -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
|
||||
|
||||
@@ -37,6 +37,17 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
|
||||
### 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
|
||||
|
||||
+1
-1
@@ -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.
|
||||
+22
-1
@@ -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
|
||||
|
||||
@@ -167,3 +167,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.
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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.
|
||||
|
||||
|
||||
@@ -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
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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",
|
||||
];
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Generated
+225
@@ -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),
|
||||
@@ -1022,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),
|
||||
@@ -1395,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),
|
||||
@@ -1500,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),
|
||||
@@ -1512,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),
|
||||
@@ -1598,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);
|
||||
@@ -1618,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);
|
||||
@@ -2432,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);
|
||||
@@ -2452,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);
|
||||
@@ -2558,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);
|
||||
@@ -2594,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);
|
||||
@@ -3562,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);
|
||||
@@ -4308,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);
|
||||
@@ -4518,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);
|
||||
@@ -4542,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);
|
||||
|
||||
@@ -4513,6 +4513,306 @@
|
||||
<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>
|
||||
|
||||
@@ -3395,6 +3395,231 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<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>
|
||||
|
||||
@@ -3390,6 +3390,231 @@ 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_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>
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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),
|
||||
|
||||
@@ -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]) },
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
- [Words FrameLedger uses](../guide/10-glossary.md)
|
||||
- [Alpha builds](../guide/11-alpha-builds.md)
|
||||
- [Advanced metrics](../guide/12-advanced-metrics.md)
|
||||
- [Controllers and input](../guide/13-controllers.md)
|
||||
- [The terms, in plain words](../guide/terms-in-plain-words.md)
|
||||
- [Limitations](../LIMITATIONS.md)
|
||||
- [Accessibility](../ACCESSIBILITY.md)
|
||||
|
||||
Reference in new issue
Block a user