Window: keep Alt and F10 from freezing the title in menu mode #419
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!419
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/419/head"
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?
@itsRevela on GitHub · 2026-11-24 03:10 UTC · original
itsRevela:fix/swallow-keyboard-menu→main· +69 −0 · 1 files · 1 commits · merged 2026-11-24 08:10 UTCWhat
The title window procedure (
lifecycle.rs,window_proc) now dropsWM_SYSCOMMAND/SC_KEYMENU, next to theSC_CLOSEhandling it already has. Everything else still goes to the title's procedure.Why
Pressing and releasing Alt (or F10) on a window makes
DefWindowProcsendSC_KEYMENU. The default handling for that puts the window into menu mode, which runs a modal menu loop on the thread that owns the window, and that thread is the title's. The title window has no menu bar, so nothing appears on screen. The title just stops: no frames, no input. Grand Theft Auto VI then aborts itself about half a minute later, with the deliberate write to0x0already discussed in #68, at+0x23cf683/+0x2215c35. Its crash reporter then tries to upload a minidump, which VIctory's network filter blocks.So a single Alt tap, for example a half-pressed Alt+Tab, ends the game. A console title never sees a window menu, so dropping it loses nothing. Alt+F4 still closes the window: it arrives as
SC_CLOSE, notSC_KEYMENU. The mouse can still open the window menu from the title bar; this PR doesn't change that path.This removes one trigger of that abort that has nothing to do with the GPU. It doesn't touch the GPU stalls that lead to the same abort in #71 and #59.
Tested
Windows 11 Pro 10.0.26200, NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.1088), Ryzen 9 5900X, Rust 1.98.1 from
rust-toolchain.toml, ond2a4bae.modules::lifecycle::tests::the_keyboard_menu_never_reaches_the_title:SC_KEYMENU(Alt alone, Alt+Space, and with low bits set) andSC_MINIMIZE;SC_MINIMIZEreaches the title;left: [61696, 61696, 61696, 61472]; with the fix it passes.cargo test -p victory-hle: 88 passed, 0 failed.cargo clippy -p victory-hle --tests: nothing inlifecycle.rs. The one warning, inxmem.rs, is already onmain.rustfmt --checkpasses, andcargo xtask policyreports 151 files ok.--features diagnosticsran in Windows Sandbox with vGPU. Each run had the start screen up at 30 fps, put the title window in front, sent one Alt tap and nothing else, and then watched for 75 s:d2a4bae0xc0000005, write0x0), and its crash reporter tries to uploadAI-assisted (Claude Code). The title runs used my own copy; no game data is in this PR.
🤖 Generated with Claude Code
@jeremygold02 on GitHub · 2026-11-24 04:39 UTC · original
Thanks @itsRevela for filtering the keyboard-menu command before it reaches the title procedure. I tested head
ff8694a69a3444bbbbdc37668181708a87d5b5ccwith:Result: 1 passed, 0 failed (86 filtered out). The test sends
SC_KEYMENUvariants andSC_MINIMIZEto a recording title procedure, verifies the menu commands are dropped, and confirms minimize still reaches it. This validates the window-procedure routing in a unit test; I did not run a title.