HLE: implement XPackage monitor update, user locale, and mount path size #2135
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2137"
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 fuzeofficlal on 2026-11-25T05:50:20Z.
Summary
XPackagevtable slots0x40,0x58, and0xc0incrates/victory-hle/src/modules/xpackage.rsto matchmain's completed single-package installation model:0x40(XPackageUpdateInstallationMonitor): Returnfalse(no installation progress change on a completed installation) instead of falling intomissing::<8>, whoseE_NOTIMPL(0x8000_4001) setsAL = 1(true) on abool-returning x64 ABI.0x58(XPackageGetUserLocale): Query the host user's default BCP-47 locale via Win32GetUserDefaultLocaleName(LOCALE_NAME_MAX_LENGTH=85, falling back to"en-US"only if empty or non-Windows), reject null buffers withE_INVALIDARG, and write UTF-8 + NUL viaput_string(E_NOT_SUFFICIENT_BUFFERwhensizeis too small), per Microsoft Learn'sXPackageGetUserLocalespecification.0xc0(XPackageGetMountPathSize): Zero non-nullsizeand returnE_INVALIDARGconsistently withmount_path(0xc8), since no content package mount handles exist.Verification
modules::xpackage::tests::monitor_update_user_locale_and_mount_path_size: verifies0x40returnsfalse,0x58matches the host'sGetUserDefaultLocaleNameand enforces buffer bounds, and0xc0agrees with0xc8.cargo test -p victory-hle --locked,cargo clippy -p victory-hle --tests --locked -- -D warnings, andcargo xtask policy: passed.Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T06:02:50Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, Rust 1.98.1 MSVC):cargo test -p victory-hle --lib xpackage::— 3 passed, 0 failed (includingmonitor_update_user_locale_and_mount_path_size)cargo clippy -p victory-hle --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean implementation of
XPackagemonitor update, user locale, and mount path size with unit tests. Looks good.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T06:33:03Z.
Review: COMMENTED
Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.
XPackage monitor update, user locale, mouse — HLE API surface expansion; locale handling is a common conformance gap, good addition.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:51:07Z.
Automated triage for the maintainers.
Needs work.
The new head
e4b9e2efixes the doc comment:mount_pathhas its own comment again, andmount_path_sizehas a separate one. The 0x40update_monitor→falseand 0xc0mount_path_size(zerosize,E_INVALIDARG, same asmount_path) changes look reasonable. CI: passing (check).Two things still block this:
runtime method not implementedwarning in a title run. For runtime return values we need some sign that the title reaches 0x40, 0x58 or 0xc0, such as a log line from a run.user_localenow returns the host's rawGetUserDefaultLocaleName. As I read the public reference, the call returns the user's locale matched against the languages the package declares, not the system's raw tag. A host tag likede-AT,en-150orsr-Latn-RSmay not be a language the title ships. If the title takes the result as a resource language, it could miss its own assets. Please cite the docs that say how the call behaves, and match against the package's languages (the manifest is already parsed inruntime::Title::from_manifest), or explain why the raw host tag is right. The new test compares the result withGetUserDefaultLocaleNameagain, so it only checks that the code does what it does.On your reply: the doc-comment fix is done. The locale change swaps one unverified value for another and does not yet answer the evidence question. If the locale slot is dropped or backed as above, and you show the title calls these slots, this could become a merge candidate.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T11:10:02Z.
Updated in
e4b9e2e7per triage feedback:0x58(user_locale): Replaced the hard-coded"en-US"literal withGetUserDefaultLocaleName(LOCALE_NAME_MAX_LENGTH=85UTF-16 code units converted to UTF-8, falling back to"en-US"only if the host returns empty or on non-Windows), matching the publicXPackageGetUserLocalespecification (which resolves to the current user's BCP-47 locale when no package locale list restricts it).mount_path's original doc comment directly abovemount_path(0xc8) and added a dedicated doc comment onmount_path_size(0xc0), which mirrorsmount_path(0xc8) onmain.VTABLEslots inxpackage.rswhose return type isbool(0x40XPackageUpdateInstallationMonitor, wheremissing::<8>returns0x8000_4001withAL = 1 == true) alongside the paired synchronous helpers (0x58,0xc0) ofmain's already-wiredcreate_monitor(0x28) andmount_path(0xc8), rather than aruntime method not implementedlog from a title run.Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T17:20:24Z.
Closing this PR: as noted in triage, implementing
XPackageslots0x40/0x58/0xc0without title call-site logs is premature.Pull request closed