Repository navigation
feat: FPS counter card with sizes, PC stats and session-menu settings - #146
Conversation
The counter gets a dark rounded card (RTSS layer with a rounded <B> fill, can be turned off), three sizes, and new styles: FPS only, Compact (FPS plus CPU, GPU and RAM usage on one line) and Detailed (frame time, API, CPU clock, GPU clock and temperature, VRAM and RAM). Custom can pick every PC item too. CPU, GPU and memory come from Windows' performance counters and the display driver (D3DKMT), the sources Task Manager uses: nothing to install and no admin. Styles that show them are rewritten every second by a ticker that stops as soon as the style changes or the session ends. FPS only keeps the "compact" id, so configs saved by 1.6.0 with Compact still show just the FPS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A on the session menu's FPS counter row now opens a list of its settings (style, size, position, card, color and, in Custom, the line layout and each item) instead of only cycling the style. A changes the focused setting and the list stays open on that row. The new Position setting keeps RTSS's OSD position by default or pins the counter to a screen corner with RTSS's sticky layer positions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.en-US.md # CHANGELOG.md
There was a problem hiding this comment.
Important
The new GPU clock and temperature queries do not match the documented D3DKMT enum/layout, so those Detailed-style values can remain unavailable.
Reviewed changes This review covers the FPS overlay/card and live PC-stat implementation, its session-menu and Settings controls, localization/docs, and associated tests.
- Overlay styles and presentation: Adds FPS-only, Compact, Detailed, and Custom output, plus configurable size, color, background card, and position.
- Hardware sampling: Adds PDH, D3DKMT, and Windows memory readers with a periodic RTSS-slot refresh for styles that need PC data.
- Configuration UI: Exposes the same settings in the Settings page and a persistent session-menu picker.
- Compatibility and coverage: Retains the legacy
compactconfig ID for FPS-only, adds localization and manual test coverage, and tests pure overlay/counter logic.
gpt-6-luna | 𝕏
| { | ||
| private const int KmtqaiGetSegmentSize = 3; | ||
| private const int KmtqaiNodePerfData = 61; | ||
| private const int KmtqaiAdapterPerfData = 62; |
There was a problem hiding this comment.
These performance-query enum values are each one too high: NODEPERFDATA is 60 and ADAPTERPERFDATA is 61 in the Windows enum, so these calls request the wrong payload types and the GPU clock/temperature reads will fail. Please use the documented values (or named constants) before relying on these readings.
Technical details
# D3DKMT query type mismatch
## Affected sites
- `src/ConsoleMode/Native/GpuKmt.cs:13-14` — enum values 61/62 select `ADAPTERPERFDATA` / `ADAPTERPERFDATA_CAPS`, rather than `NODEPERFDATA` / `ADAPTERPERFDATA`.
## Required outcome
- Match the `KMTQUERYADAPTERINFOTYPE` values for node and adapter performance data (60 and 61).
## Reference
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmthk/ne-d3dkmthk-_kmtqueryadapterinfotype| public uint Voltage; | ||
| public uint VoltageMax; | ||
| public uint VoltageMaxOc; | ||
| public ulong MaxTransitionLatency; |
There was a problem hiding this comment.
The native D3DKMT_NODE_PERFDATA also has a trailing aligned 64-bit Reserved field. Since Query sends sizeof(T) as DataSize, this shorter buffer can make the node query fail even after the enum is corrected; mirror the full native layout.
Technical details
# Node performance payload size
## Affected sites
- `src/ConsoleMode/Native/GpuKmt.cs:49-60` — `NodePerfData` omits `Reserved`.
- `src/ConsoleMode/Native/GpuKmt.cs:124` — `DataSize` is derived from the undersized struct.
## Required outcome
- Submit a `NodePerfData` buffer with the documented native size and field layout.
## Reference
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmthk/ns-d3dkmthk-_d3dkmt_node_perfdata| try | ||
| { | ||
| var adapter = new AdapterPerfData(); | ||
| var engine = new NodePerfData { NodeOrdinal = node }; |
There was a problem hiding this comment.
PhysicalAdapterIndex is an input to both performance queries, but both structs currently leave it at zero. The PDH instance already identifies phys_N; propagate that index so GPU clock and temperature queries target the selected physical adapter on linked-adapter systems.
Technical details
# Physical adapter selection
## Affected sites
- `src/ConsoleMode/Services/HardwareStats.cs:27, 60-61` — the selected adapter key includes the `phys_N` component, but the index is not exposed to the KMT reader.
- `src/ConsoleMode/Native/GpuKmt.cs:65, 103` — the performance payloads leave `PhysicalAdapterIndex` at zero.
## Required outcome
- Pass the selected physical adapter index to both adapter- and node-performance queries.
## Reference
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmthk/ns-d3dkmthk-_d3dkmt_node_perfdata
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmthk/ns-d3dkmthk-_d3dkmt_adapter_perfdata
The FPS counter becomes a card, with sizes and live PC stats, and can be tuned from the session menu.
<B>fill, can be turned off), sizes Small / Medium / Large, colour, and position: RTSS's own or one of the four screen corners.GlobalMemoryStatusExfor RAM. A ticker thread refreshes the slot only while a style needs it, guarded so it never writes after the session stops.docs/TESTING.md.Unit tests pass locally (overlay text, legacy id, sizes, positions, GPU counter parsing). Tested by the owner on hardware in a local preview build.
🤖 Generated with Claude Code