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 duplicate chat input #33

Merged
merged 2 commits into from
Jul 29, 2020
Merged

Fix duplicate chat input #33

merged 2 commits into from
Jul 29, 2020

Conversation

surrealwaffle
Copy link
Contributor

This PR aims to fix a bug with chat: if two keys are pressed simultaneously, chimera replays the first input instead.
The issue is that Halo stores an array of buffered input (up to 64), but chimera was only ever referencing the first element of the array.
static bool ignore_next_key was a symptom of this, as entering backspace would result in input in the following order:

  1. character = 0xFF, key_code = 0x1D
  2. character = 0x08, key_code = 0xFF

Since the second input replays the first, every time the user hit backspace chimera would see two special backspace characters, thus requiring that every other backspace chimera saw be dropped.
Therefore, this PR also makes changes to prevent control characters (as determined by std::iscntrl) from being inserted into chat_input_buffer and removes the ignore_next_key adjustment.

@SnowyMouse SnowyMouse merged commit 0c6285a into SnowyMouse:master Jul 29, 2020
@SnowyMouse
Copy link
Owner

Gave it a look. Thanks for fixing this!

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.

2 participants