xgameruntime: serve the analytics class a title asks for #526

Merged
csj0oe merged 1 commit from upstream-pr/526 into main 2026-11-29 21:04:36 +00:00
csj0oe commented 2026-11-29 20:08:40 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by csj0oe on 2026-11-29T20:08:40Z.


What

XSystemGetAnalyticsInfo asks the runtime for a class the provider treated as unknown (b884675d-b738-4a9c-815d-9a9a1e0c6c9b), so titles got E_NOINTERFACE and a zeroed record. That class is now served: QueryInterface answers it, slot 3 returns the 144-byte analytics record, and Release keeps the reference counts balanced.

  • New runtime/xgameruntime/src/analytics.rs with the class IID, Version and Info (repr(C)), the slot-0 query and slot-3 record.
  • runtime/xgameruntime/src/probe.rs serves the class by default and renames the entry from Unknownb884675d to AnalyticsInfo; the probe switch still exposes the other two classes.
  • The record reports the host's Windows version, with family/form set for a desktop title; revision stays 0 because the version structure has no revision field.

Verification

  • Failing first: with only the GUID and the record in place, the class test fails with 0x80004002 (E_NOINTERFACE) and passes after.
  • The 144-byte layout and the wrapper's copy size are pinned by a compiler static_assert; the interface returns the record by value with the hidden buffer in RDX, matching member-function codegen, and the guest exercises both the C++ virtual call and the explicit pointer form.
  • Guest against the real provider: the record fills all 144 bytes, QI identity holds, both releases balance; xgameruntime PASS.
  • 6 tests pass; python tuxbox.py check --no-gpu 7/7.

Not covered

  • No live launch, so no title-side read of the record was observed.
  • family and form come from the documented desktop values, not from a measured desktop build.
  • The Rust unit tests are not run by CI (pre-existing for this crate); they were run by hand under Proton GE.
<!-- greyfinch-sync:brcly/TuxBox:issue:5554620179 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/526). Originally posted by [csj0oe](https://github.com/csj0oe) on 2026-11-29T20:08:40Z. --- ## What `XSystemGetAnalyticsInfo` asks the runtime for a class the provider treated as unknown (`b884675d-b738-4a9c-815d-9a9a1e0c6c9b`), so titles got `E_NOINTERFACE` and a zeroed record. That class is now served: `QueryInterface` answers it, slot 3 returns the 144-byte analytics record, and `Release` keeps the reference counts balanced. - New `runtime/xgameruntime/src/analytics.rs` with the class IID, `Version` and `Info` (`repr(C)`), the slot-0 query and slot-3 record. - `runtime/xgameruntime/src/probe.rs` serves the class by default and renames the entry from `Unknownb884675d` to `AnalyticsInfo`; the probe switch still exposes the other two classes. - The record reports the host's Windows version, with `family`/`form` set for a desktop title; `revision` stays 0 because the version structure has no revision field. ## Verification - Failing first: with only the GUID and the record in place, the class test fails with `0x80004002` (`E_NOINTERFACE`) and passes after. - The 144-byte layout and the wrapper's copy size are pinned by a compiler `static_assert`; the interface returns the record by value with the hidden buffer in RDX, matching member-function codegen, and the guest exercises both the C++ virtual call and the explicit pointer form. - Guest against the real provider: the record fills all 144 bytes, QI identity holds, both releases balance; `xgameruntime PASS`. - 6 tests pass; `python tuxbox.py check --no-gpu` 7/7. ## Not covered - No live launch, so no title-side read of the record was observed. - `family` and `form` come from the documented desktop values, not from a measured desktop build. - The Rust unit tests are not run by CI (pre-existing for this crate); they were run by hand under Proton GE.
brcly commented 2026-11-29 20:38:01 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T20:38:01Z.


Thanks. From reading, this looks fine: honest local answers and tests for each case. We're adding Lanes self-test scenarios that call these providers, so they're checked without booting a title. We'll merge it once those pass with it.

<!-- greyfinch-sync:brcly/TuxBox:comment:7262236063 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/526#issuecomment-7262236063). Originally posted by [brcly](https://github.com/brcly) on 2026-11-29T20:38:01Z. --- Thanks. From reading, this looks fine: honest local answers and tests for each case. We're adding Lanes self-test scenarios that call these providers, so they're checked without booting a title. We'll merge it once those pass with it.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!526
No description provided.