Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input: fix no-op input loop when quitting #77651

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

andrei8l
Copy link
Contributor

@andrei8l andrei8l commented Nov 7, 2024

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 for QUIT_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!

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) new contributor json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Nov 7, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Nov 8, 2024
@Maleclypse Maleclypse merged commit f3850e2 into CleverRaven:master Nov 10, 2024
20 of 26 checks passed
@andrei8l andrei8l deleted the are-ya-quitting-son branch November 10, 2024 19:21
@andrei8l
Copy link
Contributor Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions new contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iGUI in character creation broken
2 participants