You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HLE: implement blocking and prefix-enumeration XGameSave vtable slots - #884
I found one missing failure output in the blocking provider initializer on de1f1f0. The GDK declares its provider parameter _Outptr_result_nullonfailure_. This implementation returns the error from open_at() and leaves the caller's old output value in place. Microsoft API contract
I reproduced it through slot 0x18 on Windows with a synthetic storage root. Opening a valid root returns a provider. With an ordinary file blocking the next provider's path, the next call returns NO_ACCESS and leaves that earlier provider value in the output. Clearing out with put(out, std::ptr::null_mut()) in the Err(hr) arm passed the new failure test and the existing blocking/prefix test. Synthetic probe · Windows run
Good catch @avt0m4t48! Fixed in 94061d0 (clear out to null_mut() on failure in initialize_at per _Outptr_result_nullonfailure_, plus regression test in blocking_and_prefix_methods_work).
Verified on Windows (cargo test --release -p victory-hle, clippy -D warnings, xtask policy).
AI-assisted: Gemini / Claude.
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
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.
Implements the remaining six
missing::<...>slots incrates/victory-hle/src/modules/xgamesave.rsmatching the Microsoft GDKXGameSaveAPI signatures:0x18XGameSaveInitializeProvider(blocking)open_at(shared withinitialize_async)0x38XGameSaveGetRemainingQuota(blocking)remaining_quota(shared withquota_async)0x50XGameSaveDeleteContainer(blocking)remove_container(shared withdelete_async)0x78XGameSaveEnumerateContainerInfoByNamereport, shared withenumerate_containers(0x70)0x90XGameSaveEnumerateBlobInfoenumerate_blobs(0x98) withnullprefix0xd8XGameSaveSubmitUpdate(blocking)Update::submitVerification
Run on Windows 11 Pro (x86_64-pc-windows-msvc, Rust 1.98.1):
cargo test --release -j 2 -p victory-hle-> 99 passed; 0 failed (lib) + 1 passed; 0 failed (no_dll_planting), including newmodules::xgamesave::tests::blocking_and_prefix_methods_workcovering all six vtable offsets (0x18,0x38,0x50,0x78,0x90,0xd8), null/invalid arguments (E_INVALIDARG,INVALID_CONTAINER_NAME,NO_ACCESS), prefix filtering, blob enumeration, blocking submit, quota tracking, and deletion.cargo clippy -j 2 -p victory-hle --all-targets --no-deps -- -D warnings-> 0 warnings, exit 0 (uses--no-depsbecause workspace dependencyvictory-gpuonf85101bhas two pre-existing lints noted in DirectStorage: a destination page number the title has not written yet is read again, not failed at once #855).cargo run -j 2 -p xtask -- policy->asset policy: 175 files ok.Note: Tested via synthetic unit tests in
victory-hle; the new unit test validates all six slots end-to-end without requiring game files.AI-assisted: code, tests, and PR description were written with AI assistance.