HLE: enumerate the current installation for XPackageKind::Game #1825

Open
n-romanovich wants to merge 1 commit from upstream-pr/1827 into main
n-romanovich commented 2026-11-24 23:05:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by n-romanovich on 2026-11-24T23:05:10Z.


Implements XPackageEnumeratePackages for XPackageKind::Game (kind == 0) in crates/victory-hle/src/modules/xpackage.rs instead of returning an empty list:

  • Defines #[repr(C)] PackageDetails matching the GDK XPackageDetails layout.
  • Returns E_INVALIDARG when callback is null, yields this installation once (index = 0, count = 1, package_identifier/title_id from identifier(), store_id from runtime::title()) for kind == 0, and keeps kind != 0 (Content) empty.
  • Extends the_installation_is_complete_and_alone with synthetic unit tests covering kind == 0, kind == 1, and null callback handling.

AI-assisted; verified with cargo test -p victory-hle --locked -- xpackage and cargo clippy -p victory-hle --all-targets --locked, plus independent subagent review.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6593199825 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1827). Originally posted by [n-romanovich](https://github.com/n-romanovich) on 2026-11-24T23:05:10Z. --- Implements `XPackageEnumeratePackages` for `XPackageKind::Game` (`kind == 0`) in `crates/victory-hle/src/modules/xpackage.rs` instead of returning an empty list: - Defines `#[repr(C)] PackageDetails` matching the GDK `XPackageDetails` layout. - Returns `E_INVALIDARG` when `callback` is null, yields this installation once (`index = 0`, `count = 1`, `package_identifier`/`title_id` from `identifier()`, `store_id` from `runtime::title()`) for `kind == 0`, and keeps `kind != 0` (`Content`) empty. - Extends `the_installation_is_complete_and_alone` with synthetic unit tests covering `kind == 0`, `kind == 1`, and null callback handling. AI-assisted; verified with `cargo test -p victory-hle --locked -- xpackage` and `cargo clippy -p victory-hle --all-targets --locked`, plus independent subagent review.
catminou4 commented 2026-11-25 00:06:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:47:46Z.

Review: COMMENTED


Static review only: victory-hle is Windows-only — nothing compiles on macOS; source review of the diff.

Enumerate the current installation for X…: HLE installation enumeration fix. Windows-only.

<!-- greyfinch-sync:Marvisak/VIctory:review:6049283309 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1827#pullrequestreview-6049283309). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:47:46Z. **Review:** COMMENTED --- Static review only: victory-hle is Windows-only — nothing compiles on macOS; source review of the diff. Enumerate the current installation for X…: HLE installation enumeration fix. Windows-only.
DesertGamer commented 2026-11-25 00:06:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T23:06:21Z.


VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7147018858 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1827#issuecomment-7147018858). Originally posted by [DesertGamer](https://github.com/DesertGamer) on 2026-11-24T23:06:21Z. --- ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Marvisak commented 2026-11-25 07:03:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:32:25Z.


Automated triage for the maintainers.

Needs work. enumerate in crates/victory-hle/src/modules/xpackage.rs now reports this installation for the game kind (0) and returns E_INVALIDARG for a null callback.

Update after your reply: thanks. At ae3f4ef, title_id comes from runtime::title().id, and the comments no longer name the console SDK. Three points from the last review are still open:

  • No caller shown. The removed comment recorded that Grand Theft Auto VI enumerates only content (kind 1, title+0x2937bf0). Please name a call site that reaches kind 0, or something that goes wrong today. Otherwise this adds behaviour nothing uses.
  • Evidence for the values. version is still 0, and the {:08X} format for title_id has no stated source. The field order of PackageDetails also needs a basis that is not copied from a header, such as how the title's callback reads the record.
  • E_INVALIDARG for a null callback changes a runtime return value. Please cite where it comes from. Before this PR, a null callback returned S_OK.

CI: check passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154895573 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1827#issuecomment-7154895573). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:32:25Z. --- <!-- victory-triage v1 head=ae3f4ef8331399dfa64ce3694009c013902e3cb0 verdict=needs-work at=2026-11-25T07:18:29Z --> Automated triage for the maintainers. **Needs work.** `enumerate` in `crates/victory-hle/src/modules/xpackage.rs` now reports this installation for the game kind (0) and returns `E_INVALIDARG` for a null callback. Update after your reply: thanks. At `ae3f4ef`, `title_id` comes from `runtime::title().id`, and the comments no longer name the console SDK. Three points from the last review are still open: - **No caller shown.** The removed comment recorded that Grand Theft Auto VI enumerates only content (kind 1, title+0x2937bf0). Please name a call site that reaches kind 0, or something that goes wrong today. Otherwise this adds behaviour nothing uses. - **Evidence for the values.** `version` is still 0, and the `{:08X}` format for `title_id` has no stated source. The field order of `PackageDetails` also needs a basis that is not copied from a header, such as how the title's callback reads the record. - **`E_INVALIDARG` for a null callback** changes a runtime return value. Please cite where it comes from. Before this PR, a null callback returned `S_OK`. CI: `check` passing. --- _Generated by [Claude Code](https://claude.ai/code)_
n-romanovich commented 2026-11-25 07:03:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by n-romanovich on 2026-11-25T06:43:44Z.


@Marvisak, updated feat/hle-xpackage-enumerate-game (ae3f4ef) to address the triage points:

  • title_id field: now populated from runtime::title().id formatted as {:08X} instead of the package identifier string (test updated accordingly).
  • Repo rule: reworded the doc/safety comments to avoid naming the console SDK or its header identifiers.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7155095364 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1827#issuecomment-7155095364). Originally posted by [n-romanovich](https://github.com/n-romanovich) on 2026-11-25T06:43:44Z. --- @Marvisak, updated `feat/hle-xpackage-enumerate-game` (`ae3f4ef`) to address the triage points: - **`title_id` field**: now populated from `runtime::title().id` formatted as `{:08X}` instead of the package identifier string (test updated accordingly). - **Repo rule**: reworded the doc/safety comments to avoid naming the console SDK or its header identifiers.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1827:upstream-pr/1827'
git switch 'upstream-pr/1827'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1827'
git switch 'upstream-pr/1827'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1827'
git switch 'upstream-pr/1827'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1827'
git switch 'main'
git merge --squash 'upstream-pr/1827'
git switch 'main'
git merge --ff-only 'upstream-pr/1827'
git switch 'main'
git merge 'upstream-pr/1827'
git push origin 'main'
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
Marvisak/VIctory!1825
No description provided.