Repository navigation
XGameRuntime & advapi32legacy: UE4 startup, login, and hotfix parity - #24
Merged
Merged
Conversation
Collaborator
|
Reviewed and merged, thanks. Checked on top of current main: full workspace tests pass (258 lib tests, e2e, console-library tests), no new build warnings. Notes from the review:
|
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements missing XGameRuntime and
advapi32legacy.dllsemantics needed by UE4/GDK console titles (e.g. Fortnite startup, login, and hotfix flows), written cleanly in XCL's idioms without touchingd3d12x,xg.rs, ortitle_textures.rsand preserving XCL's offlineXStorerefusal policy.Changes
XUserGetTokenAndSignature{,Utf16}{Async,ResultSize,Result}+ XSTS v1 ECDSA P-256 signing (crates/xcl/src/hle/xgameruntime/xsign.rs,mod.rs,api.rs):bcrypt.dll, zero new crate dependencies) and produces a real Base64-encoded 76-byte XSTS v1 signature header ([version=1 BE][filetime BE][64-byte raw P-256 sig]) alongside an offlineXBL3.0authorization token.GameChat2,libHttpClient.GDK,EOSSDK) that reject or mis-index empty signatures.PayloadBuf/begin_with_fixupsinxasync.rsso internal result-struct pointers (token,signature) are relocated inOP_GET_RESULTfor both XCL's ownXAsyncand the PCxgameruntime.dllpath.User device association & controller lookup (
mod.rs,api.rs):XUserFindForDevice(slot XAudio2: real Opus decoder via Windows MSOpusDecoder MFT #3 onXUSER_DEVICE) now associates controllers with the local signed-in user (S_OK) instead of returningE_GAMEUSER_USER_NOT_FOUND.XUserFindControllerForUserWithUiAsync/Result(slots Olympus: harden DXIL cache identity and validation #9–Olympus: harden GameSave read results #10).XNetworkingHLE (37e56907/bf2346b2, slots XAudio2: real Opus decoder via Windows MSOpusDecoder MFT #3–Olympus: add bounded mesh wave dispatcher #17) (crates/xcl/src/hle/xgameruntime/networking.rs,api.rs):3074, sync + async), per-URL HTTP security information (UTF-8 & UTF-16, TLS 1.2|1.3, exact GDK(block, bufSize, bufUsed, buf, outPtr)argument order), connectivity hint viaiphlpapi.dll, registration tokens, andXNetworkingVerifyServerCertificate(real CryptoAPI SSL chain + SHA-1 thumbprint pin verification with plain-HTTP loopback allowance for local servers).XTaskQueuecomposite queues, monitors, andXAsynclifecycle + fallback (taskqueue.rs,xasync.rs,api.rs):PorttoArc<Port>with weak-referenced port handles (XTaskQueueGetPortOlympus: emulate geometry wave64 on wave32 #14,XTaskQueueCreateCompositeOlympus: probe large RPF9 archives safely #13) and per-queue item ownership so terminating a composite queue cancels only its own work and never aborts sibling work on shared ports.XTaskQueueRegisterMonitor/UnregisterMonitorcallbacks andXThreadVerifyNotTimeSensitive/XThreadAssertNotTimeSensitive.XAsyncBlockstate retention leak by removing completed/consumed entries fromACTIVEwhile storing a compact completion header inblock.internal, fixes double-XAsyncGetResultto returnE_ILLEGAL_METHOD_CALL(0x8000000E), and snapshots callback/queue pointers before wakingXAsyncGetStatuswaiters.XASYNCCOM object as an automatic fallback inQueryApiImplwhenSystem32\xgameruntime.dll(Gaming Services) is absent (while continuing to use PCxgameruntime.dllwhen present).Console GDK 19041/2020 IID compatibility,
XErrorCOM class, and vtable fixes (api.rs):XPackagev1 (be3f3e9f, slot 28XPackageEnumeratePackages),XPackagev2 (f92d8712, slots 35/36EnumeratePackages/RegisterPackageInstalled),XSystemv3 (6fd71f09, slot 4XSystemGetAppSpecificDeviceIdinstead ofSandboxId), plusXPackageGetIdentifier(slot 27) and compatible alias IIDs (XUserv2,XSystemv2,XGamev1,XPLSv1).SLOTSfrom80to96so GDK table slots80..=83are not truncated.XErrorCOM class (8ca467f7, slots XAudio2: real Opus decoder via Windows MSOpusDecoder MFT #3–Olympus: expand RDNA2 ISA compatibility #5) without triggeringDebugBreak.XGameUi) so querying an older IID does not poison the main IID's cached PC vtable pointer.advapi32legacy.dllLSA & Advapi32 system fallback (crates/xcl/src/hle/mod.rs,crates/xcl/src/resolver.rs):advapi32.dllandsechost.dlltoKERNELX.fallbackso non-hooked imports fromadvapi32legacy.dll(such asLsaOpenPolicy,LsaQueryInformationPolicy,LsaClose,LookupPrivilegeValueW) resolve to Windows' realadvapi32.dll/sechost.dllinstead of auto-stubbing to0(for both static PE imports andLoadLibrary+GetProcAddress).Verification
cargo build --workspace: 0 new warnings.cargo test --workspace -- --test-threads=4: all tests passed (xcllib 258 passed including 18 new unit tests acrossxsign,networking,taskqueue,xasync,api, andresolver;console_dlls_e2e12 passed;console_shaders1 passed;e2e1 passed including newxcl_testtitlechecks;gpu_pso_e2e6 passed;xg_oracle3 passed).