[pr-diagnostics][input] Mouse capture log names the menu or pause condition that released it (#189) #399
Loading…
Reference in a new issue
No description provided.
Delete branch "elgibbone/menu-pause-cause"
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?
Refs #189
What it changes
native mouse capture changes want=false window_focused=true in_menu=true map_active=falseat 03:58:29.388 andwant=true ... in_menu=falseat 03:58:34.557, while the player aimed and pressed Y on a shopkeeper.in_menuis one boolean for eleven conditions, so the log can't say which one the title raised.is_menu_or_pausedis split intomenu_or_paused_cause, which returns the name of the first condition that holds (f1_menu,map,frontend,user_pause,menu_pause,sys_pause,no_local_player,hud_pause_menu,hud_shop_menu,extra_pause,modal) orNone.is_menu_or_pausedis nowmenu_or_paused_cause().is_some(): same reads, same order, same early return on the quick-select wheel. Thenative mouse capture changesline getsmenu_cause=<name>(nonewhen nothing holds), and the overlay poll takesin_menufrom the same call, so the field andin_menucan't disagree.Logging only: no behaviour or default changes. The next #189 log names the condition, and the fix follows from it.
How it was tested
6029872(on mainf3840d7)cargo clippy --workspace --all-targets --locked -- -D warningsclean, the same with--all-featuresclean,cargo xtask policypassed,cargo test -p darner-hle --locked496 passed, 0 failed, 15 ignored. Not the wholecargo test --workspace.Checklist
main.docs/asset-policy.md.Checked for overlap
gameinput.rs(keyboard bindings), not this code. No open PR changesmousehook.rs.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.