input: fix no-op input loop when quitting #77651
Merged
+15
−7
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
None
Purpose of change
SIGINT handling from #75999 uses a
QUIT
input action to escape (most) input loops. However, some UIs double check that you really want to quit, leading to a stuck query loop.Describe the solution
Ensure that a no-op input loop can't be reached by resetting quit reason to
QUIT_EXIT_PENDING
Also check for
QUIT_EXIT_PENDING
in every other place that checks forQUIT_EXIT
Describe alternatives you've considered
Reverting #67893, #75999, and #77457: sunk cost or something
Adding a new new input action called
QUIT_ALREADY
then propagating that to every input loop in the game: maybe we can avoid this...Testing
SIGINT or closing the window prompts and closes the game at the main menu, at character creation, while loading a save file, while idling, while executing an action, from all inventory UIs, and from debug prompt.
Additional context
This definitely fixes the SIGINT issue. For sure. G U A R A N T E E D. No other bugs are possible. Nope!