d3d12: F3 and F1 in the launcher's look, translated, with pad support (D3D12-INGAME-UI-STYLE) #3491

Code

Clone this repository

Checkout

From your project repository, check out a new branch and test the changes.

git fetch -u origin "+refs/pull/3491/head:oreofr/ingame-ui-style"
git switch "oreofr/ingame-ui-style"
Open
leonida/mandy
OreoFR wants to merge 5 commits from oreofr/ingame-ui-style into main AGit

This branch is out-of-date with the base branch

Conversation
Reviewers 0 approvals
  • No reviewers
Details
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3491/head:oreofr/ingame-ui-style'
git switch 'oreofr/ingame-ui-style'
Member

Item: D3D12-INGAME-UI-STYLE (claimed in #3312, comment 25866). Depends on: none. Pairs with #3455, which passes LEONIDA_LANGUAGE from the launcher.

What changes

F3, the stats panel

  • F3 now cycles off → small fps pill → full panel → off.
  • Pill: one line, about 150 px at 1080p. It shows 64 fps · 32 real and a tag naming what really runs, with the version read from the loaded DLL: DLSS 4, DLSS 4 · FG 2x, FSR 3 · FG, and FSR 4 / DLSS 5 with no code change. One table maps DLL versions to generations; an unknown version is shown raw. When FG was asked for but is not running, the tag says FG off: <reason>.
  • Full panel: header with build and commit, three tiles (fps with ms and the worst frame, GPU busy, waits for GPU), then the Picture, Memory (VRAM bar against the budget) and CPU and shaders sections, history graphs, a hardware line, and a Details part that keeps every number the old panel showed.
  • Colours: green, yellow under 30 fps, red under 20.
  • LEONIDA_FPS_LINE still drives the pill. LEONIDA_PANEL=1 opens on the full panel.

F1, the settings menu

  • Nine pages behind a rail: Picture, Lighting, Memory, Frame generation, Display, Stats panel, Controls, Tools, Advanced.
  • Choices with six options or fewer show as a segmented control, the others as ‹ value ›.
  • Each row is marked Live (applies now, as live() already decides) or Restart. The lead line counts the changes waiting for the next start.
  • The same settings file and the same actions as before, so the launcher stays in sync.
  • A key bar is drawn at the bottom and shows the device used last:
    • keyboard: ↑↓ choose, ←→ change, Tab / Shift+Tab page, Enter, Esc;
    • pad: RB + d-pad Right opens and closes, LB/RB page, A confirm, B close. The title gets no pad input while F1 is open.

Language

  • en, fr, es, pt and de, in one table (leonida-menu/src/i18n_table.rs). 132 strings reuse the launcher's own translations word for word.
  • The language comes from LEONIDA_LANGUAGE first, then Windows' UI language with the launcher's table, then English.
  • Long strings are cut with "…", and a layout test covers every language, keyboard and pad, at 720, 1080 and 2160 lines.

Look

  • Text is Segoe UI rasterised at start (GDI, 4× then downsampled). No font file ships; the old bitmap font is the fallback.
  • LEONIDA_PANEL_STYLE=classic brings back the old panel, fps line and F1.

Tested

  • cargo test: leonida-gpu 804, leonida-hle 309, leonida-menu 77, all OK. The new tests cover the F3 cycle, thresholds, the version table and badge text, page coverage, Live/Restart marks, keyboard and pad mapping, auto-repeat, the language pick and layout.
  • clippy -D warnings is clean on leonida-menu and on the touched files.
  • Diag build OK. switches.md regenerated, --check OK. check_no_game_data OK.
  • In game on an RTX 4070 Laptop (8 GB), main build of this branch, Windows in French:
    • the pill, the full panel and two F1 pages draw correctly, in French;
    • level 2 costs 94–134 µs a frame on the present thread, and painting takes 4.4–5.9 ms on its own thread twice a second;
    • a bug found there is fixed: a short F3 press at 10–20 fps fell between frames, and F3 is now read every 10 ms.
  • Not measured: level 1's cost in game.
  • To review: the es/pt/de strings not taken from the launcher were written by the agent and want a native reader.

AI-assisted (Claude Code). Off-by-default fallback: LEONIDA_PANEL_STYLE=classic.

🤖 Generated with Claude Code

Added (34b6c9109, oreofr-agent): the F3 panel in every build; real compiles; no violet bar

  • The F3 panel is no longer behind the diagnostics feature, so a release build shows it too.
  • Only what diagnostics alone measure stays diagnostics-only: "Recording" and "Waits pipes".
  • The game's RAM is read from Windows (K32GetProcessMemoryInfo).
  • A diagnostics build shows the panel exactly as before.
  • "Compiling" (F3 row, fps pill, classic fps line) now counts real compiles: makings of 20 ms or more (library::COMPILED), over about two seconds. The queue it showed before also held pipelines loading from a cache: a player with a warm cache saw "892 compiling".
  • The violet-to-pink bar on top of F1 and F3 is gone (OreoFR).
  • Tested: cargo check in release and diagnostics; leonida-menu (77); the panel and frametime tests in both builds. Also in beta 1a6332c3f.
  • Not measured: the panel's cost in a release build.
**Item:** D3D12-INGAME-UI-STYLE (claimed in #3312, comment 25866). Depends on: none. Pairs with #3455, which passes `LEONIDA_LANGUAGE` from the launcher. ## What changes **F3, the stats panel** - F3 now cycles off → small fps pill → full panel → off. - **Pill:** one line, about 150 px at 1080p. It shows `64 fps · 32 real` and a tag naming what really runs, with the version read from the loaded DLL: `DLSS 4`, `DLSS 4 · FG 2x`, `FSR 3 · FG`, and `FSR 4` / `DLSS 5` with no code change. One table maps DLL versions to generations; an unknown version is shown raw. When FG was asked for but is not running, the tag says `FG off: <reason>`. - **Full panel:** header with build and commit, three tiles (fps with ms and the worst frame, GPU busy, waits for GPU), then the Picture, Memory (VRAM bar against the budget) and CPU and shaders sections, history graphs, a hardware line, and a Details part that keeps every number the old panel showed. - **Colours:** green, yellow under 30 fps, red under 20. - `LEONIDA_FPS_LINE` still drives the pill. `LEONIDA_PANEL=1` opens on the full panel. **F1, the settings menu** - Nine pages behind a rail: Picture, Lighting, Memory, Frame generation, Display, Stats panel, Controls, Tools, Advanced. - Choices with six options or fewer show as a segmented control, the others as `‹ value ›`. - Each row is marked **Live** (applies now, as `live()` already decides) or **Restart**. The lead line counts the changes waiting for the next start. - The same settings file and the same actions as before, so the launcher stays in sync. - A key bar is drawn at the bottom and shows the device used last: - keyboard: ↑↓ choose, ←→ change, Tab / Shift+Tab page, Enter, Esc; - pad: RB + d-pad Right opens and closes, LB/RB page, A confirm, B close. The title gets no pad input while F1 is open. **Language** - en, fr, es, pt and de, in one table (`leonida-menu/src/i18n_table.rs`). 132 strings reuse the launcher's own translations word for word. - The language comes from `LEONIDA_LANGUAGE` first, then Windows' UI language with the launcher's table, then English. - Long strings are cut with "…", and a layout test covers every language, keyboard and pad, at 720, 1080 and 2160 lines. **Look** - Text is Segoe UI rasterised at start (GDI, 4× then downsampled). No font file ships; the old bitmap font is the fallback. - `LEONIDA_PANEL_STYLE=classic` brings back the old panel, fps line and F1. ## Tested - `cargo test`: leonida-gpu 804, leonida-hle 309, leonida-menu 77, all OK. The new tests cover the F3 cycle, thresholds, the version table and badge text, page coverage, Live/Restart marks, keyboard and pad mapping, auto-repeat, the language pick and layout. - clippy `-D warnings` is clean on leonida-menu and on the touched files. - Diag build OK. `switches.md` regenerated, `--check` OK. `check_no_game_data` OK. - In game on an RTX 4070 Laptop (8 GB), main build of this branch, Windows in French: - the pill, the full panel and two F1 pages draw correctly, in French; - level 2 costs 94–134 µs a frame on the present thread, and painting takes 4.4–5.9 ms on its own thread twice a second; - a bug found there is fixed: a short F3 press at 10–20 fps fell between frames, and F3 is now read every 10 ms. - Not measured: level 1's cost in game. - To review: the es/pt/de strings not taken from the launcher were written by the agent and want a native reader. AI-assisted (Claude Code). Off-by-default fallback: `LEONIDA_PANEL_STYLE=classic`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) **Added (34b6c9109, oreofr-agent): the F3 panel in every build; real compiles; no violet bar** - The F3 panel is no longer behind the diagnostics feature, so a release build shows it too. - Only what diagnostics alone measure stays diagnostics-only: "Recording" and "Waits pipes". - The game's RAM is read from Windows (`K32GetProcessMemoryInfo`). - A diagnostics build shows the panel exactly as before. - "Compiling" (F3 row, fps pill, classic fps line) now counts real compiles: makings of 20 ms or more (`library::COMPILED`), over about two seconds. The queue it showed before also held pipelines loading from a cache: a player with a warm cache saw "892 compiling". - The violet-to-pink bar on top of F1 and F3 is gone (OreoFR). - Tested: cargo check in release and diagnostics; `leonida-menu` (77); the panel and frametime tests in both builds. Also in beta 1a6332c3f. - Not measured: the panel's cost in a release build.
F3 cycles off, a one-line fps pill (level 1) and the full panel (level 2):
the pill shows the frames shown and rendered, coloured green, yellow under
30 and red under 20, with a badge naming the upscaler and frame generation
by the version of the library really loaded (nvngx_dlss/dlssg 310.x is
DLSS 4, FidelityFX providers by their major version; one table in
leonida_menu::hud::generation), or why frame generation asked for is off.
The panel has three tiles, Picture, Memory and CPU and shaders sections,
history graphs, the hardware and a Details part with every number of the
old panel. Both are painted on a thread of their own and laid over the
picture as the trainer menu is.

The F1 menu has pages in a rail (Tab/Shift+Tab, LB/RB), settings as cards
with their choices as segmented controls (or < value > when they do not
fit), each marked Live or Restart, the count of changes waiting in the
lead line, and a bar of keycaps (or pad buttons, whichever was used last)
with Reset, Save for next start and Save and restart now. The pad: RB +
d-pad Right opens and closes it, d-pad picks and changes, A confirms, B
closes; while it is open the title gets no pad input at all. Same
settings file as before.

Text is Segoe UI from GDI, rasterised at four times the size and averaged
down (GdiSmooth), with the dot font as the fallback; nothing of a font is
in the repository. LEONIDA_PANEL_STYLE=classic keeps the old dot-letter
panel, frame-rate line and menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The F1 menu and the F3 overlay pick their language as the launcher does:
LEONIDA_LANGUAGE (en, fr, es, pt, de; the launcher's "language" setting)
wins, else the Windows display language by the launcher's table, else
English. The texts are keyed by their English wording in one table in
leonida-menu (i18n_table.rs), which takes the launcher's own translation
where it has the same English text. Technical words, the Advanced page's
switch names and the F3 Details numbers stay as they are.

Atlases now carry Latin-1 and the typographic quotes (the dot font shows
letters without their accents). The bar of keys keeps the most needed ones
when a language is long (choose, change, close first) and the buttons take
at most half of it, a longer label cut; a test lays the menu out in every
language at 720, 1080 and 2160 lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At 10 frames a second a short F3 press fell between two presents, which
asked the key's state once a frame. In the launcher's look F3 is now seen
by the settings menu's thread every 10 ms and queued, as F1's keys are;
the classic panel keeps asking for it itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	d3d12/docs/switches.md
As OreoFR asked: the F3 panel leaves the diagnostics so a release build shows it too. The module, its
field, its drawing and its frame count, the stall numbers it reads (frametime::LAST) and the meter's
line_due are no longer behind the diagnostics feature. What only a diagnostics build measures stays
there: "Recording" (the frame recorder's time) and "Waits pipes" (the pipeline waits), in the detail
and in the classic lines, which then show the resident waits alone. The game's RAM ("Game RAM",
"In memory") is read from Windows in every build (K32GetProcessMemoryInfo, as copystat did). A
diagnostics build shows the panel exactly as before.

"Compiling" now counts real compiles: pipelines whose making took 20 ms or more (library::COMPILED),
over about the last two seconds (pipeline::compiling). The queue it counted before also holds pipelines
that load from the driver's cache or the library at once, so a warm cache showed "892 compiling" or
"shaders 720 left". The F3 row, the fps pill ("N compiling") and the classic fps line use it; the queue
stays in the detail ("Pipes pending").

The violet-to-pink bar on top of the F1 menu and of the F3 panel is gone (OreoFR).

Tested: cargo check release and diagnostics, cargo test -p leonida-menu (77), the panel and frametime
tests in both builds. Not measured in game yet: the panel's cost in a release build is next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.