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

Fix input event handling #1693

Merged
merged 1 commit into from
Aug 30, 2023
Merged

Fix input event handling #1693

merged 1 commit into from
Aug 30, 2023

Conversation

iscke
Copy link
Contributor

@iscke iscke commented Aug 27, 2023

this somewhat fixes a particular bug I've experienced in text handling, in which as far as i can tell:

  • the user triggers dialogic_default_action on the same frame they also trigger another input action (say, moving the mouse)
  • _input is called for the dialog_default_action, dialogic_default_action has been pressed this frame, so the coroutine to advance text (handle_event) starts
  • _input is called for the other action, dialogic_default_action has been pressed this frame, so the coroutine to advance text starts again
  • the coroutines resolve, text is advanced twice, and a line gets skipped

i believe this PR fixes the input situation, but the race condition still probably exists. i don't understand how godot godot coroutines work well enough to tell if it's actually an issue, though.

@Jowan-Spooner Jowan-Spooner merged commit 74175fc into dialogic-godot:main Aug 30, 2023
@Jowan-Spooner
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants