HLE: export constrained app notifications #1557

Closed
Calvix2k wants to merge 2 commits from upstream-pr/1558 into main
Calvix2k commented 2026-11-24 19:10:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-24T19:10:27Z.


Summary

Adds the two missing exports from api-ms-win-core-psm-appnotify-*:

  • RegisterAppConstrainedChangeNotification validates the callback and output pointer, stores the callback/context, and returns a registration token.
  • UnregisterAppConstrainedChangeNotification removes the matching registration.

Adds regression coverage for HLE export resolution and registration lifecycle. The ABI mirrors the existing app-state notification functions and the appnotify declarations used by Windows compatibility implementations.

Verification

  • cargo test -p victory-hle --locked -- --test-threads=1: 95 passed, 0 failed; integration test passed.
  • cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings: passed.
  • rustfmt --edition 2024 --check on lifecycle.rs: passed.
  • cargo xtask policy: passed (154 files ok).

No game assets used.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6589392266 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1558). Originally posted by [Calvix2k](https://github.com/Calvix2k) on 2026-11-24T19:10:27Z. --- ## Summary Adds the two missing exports from `api-ms-win-core-psm-appnotify-*`: - `RegisterAppConstrainedChangeNotification` validates the callback and output pointer, stores the callback/context, and returns a registration token. - `UnregisterAppConstrainedChangeNotification` removes the matching registration. Adds regression coverage for HLE export resolution and registration lifecycle. The ABI mirrors the existing app-state notification functions and the appnotify declarations used by Windows compatibility implementations. ## Verification - `cargo test -p victory-hle --locked -- --test-threads=1`: 95 passed, 0 failed; integration test passed. - `cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings`: passed. - `rustfmt --edition 2024 --check` on `lifecycle.rs`: passed. - `cargo xtask policy`: passed (`154 files ok`). No game assets used.
acetonahard-code commented 2026-11-24 23:05:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by acetonahard-code on 2026-11-24T22:26:14Z.


Tested on Windows 11 with the repo toolchain, merged into current main (70564ae):

cargo test -p victory-hle passed failed ignored
main 99 0 0
main + this PR 100 0 0
  • The new test passes.
  • cargo clippy --all-targets -- -D warnings, with and without --all-features: clean.

I didn't test with game data.


Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7146227590 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1558#issuecomment-7146227590). Originally posted by [acetonahard-code](https://github.com/acetonahard-code) on 2026-11-24T22:26:14Z. --- Tested on Windows 11 with the repo toolchain, merged into current `main` (70564ae): | `cargo test -p victory-hle` | passed | failed | ignored | |---|---|---|---| | `main` | 99 | 0 | 0 | | `main` + this PR | 100 | 0 | 0 | - The new test passes. - `cargo clippy --all-targets -- -D warnings`, with and without `--all-features`: clean. I didn't test with game data. --- <sub>Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.</sub>
upstream-sync closed this pull request 2026-11-25 01:06:50 +00:00
Marvisak commented 2026-11-25 01:08:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:42:30Z.


Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #1080. Stores constrained-change registrations but never calls them, so nothing changes for the title; #1080 serves the same two exports and calls the routines before suspend.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148792980 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1558#issuecomment-7148792980). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:42:30Z. --- Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1080. Stores constrained-change registrations but never calls them, so nothing changes for the title; #1080 serves the same two exports and calls the routines before suspend. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Calvix2k commented 2026-11-25 01:08:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T00:49:04Z.


Superseded by main: origin/main now exports RegisterAppConstrainedChangeNotification and UnregisterAppConstrainedChangeNotification through lifecycle::CONSTRAINED (a Registration list shared with the suspend routines), so the title-visible behaviour this PR added is already there. Closing in favour of main; no part of the PR is lost.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148908645 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1558#issuecomment-7148908645). Originally posted by [Calvix2k](https://github.com/Calvix2k) on 2026-11-25T00:49:04Z. --- Superseded by main: origin/main now exports RegisterAppConstrainedChangeNotification and UnregisterAppConstrainedChangeNotification through lifecycle::CONSTRAINED (a Registration list shared with the suspend routines), so the title-visible behaviour this PR added is already there. Closing in favour of main; no part of the PR is lost.

Pull request closed

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!1557
No description provided.