HLE: report the single supported offline user #398
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/398"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by ToxicmaggotRP on 2026-11-24T02:56:06Z.
Title:
HLE: implement the maximum supported offline users query
Summary
0x30.1, matching VIctory's current single-offline-user HLE implementation.puthelper to validate and write the output parameter.Context
The current XUser implementation exposes one offline local user, but the maximum-users method was still returning
E_NOTIMPL.This implements that missing part of the current single-user HLE model.
Related discussion: #348. This change does not claim to resolve the initialization crash reported there; that still requires a reproduction with the modified build.
Tests
maximum_users_reports_the_single_offline_user.S_OKand a maximum user count of1.E_INVALIDARGfor a null output pointer.cargo testhas not yet been run on this branch.AI ASSISTED (CHATGPT)
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T04:29:15Z.
Thanks @ToxicmaggotRP for making the offline-user limit explicit. I tested head
1d6f71e78730821f89f10c65fba14713d62b05fdwith:Result: 2 passed, 0 failed (85 filtered out). The tests cover the reported maximum of one offline user and startup adding that user and returning its ID. They validate the HLE object behavior, not a title’s full sign-in flow.
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T08:08:19Z.
Review: APPROVED
Tested
1d6f71eon Windows 11, RTX 5070, MSVC:cargo test --workspace --no-fail-fastpasses (265 passed, 0 failed).XUserGetMaxUsersreporting 1 matches the single offline user this HLE ever adds.putgives the usualE_INVALIDARGfor a null output, and the test checks both paths. Moving "maximum users" out of the unset-slots comment keeps that comment accurate.No issues found.
AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:30:32Z.
Automated triage for the maintainers.
Needs work. This fills xuser vtable slot 0x30 (
crates/victory-hle/src/modules/xuser.rs) withget_max_users(This, *mut u32)returning 1. The open question is the signature: several other open PRs fill the same slot as(This, Handle, *mut u32)(#648, #623, #1330, #1368, #1521), and #648 says the title calls it during account init. If the real method takes a user handle, this version writes the 1 through the handle argument; if not, those PRs write through an undefined register. Either way a wrong guess corrupts memory rather than just returning a wrong value. Please add evidence for the argument list (the title's call site and which registers it sets, or public documentation of the method) and say whether the title really calls it, since the comment in main says no title seen does. With the signature confirmed this is small and fine; a maintainer should then pick one of the duplicates.CI: no check runs on the head commit.
Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.