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 SDL double input #782

Merged
merged 5 commits into from
Dec 20, 2023
Merged

fix SDL double input #782

merged 5 commits into from
Dec 20, 2023

Conversation

barbeque-squared
Copy link
Member

@barbeque-squared barbeque-squared commented Dec 2, 2023

fixes #743

this attempts to fix the double keypresses that cause issues like "pause not working" by defaulting to SDL_StopTextInput and only explicitly enabling (and subsequently disabling) it when we actually need it. Drawbacks are that manual disabling is required, although it will eventually fix itself if you go through a couple of screens/fields.

FOR THE TIME BEING THIS IS A DRAFT UNTIL MORE TESTING HAS BEEN DONE. Currently, at least the following unchecked areas still need attention:

  • Party mode
  • Jukebox mode
  • Web highscore plugins (you need to enter username/password at some point)
  • Mouse interaction/navigation (in items already fixed at time of creating this PR, ie: player name, song jumpto, editor) -- for other items do it when fixing it for keyboard

However, the upside is that it will generally manifest as "I can't edit field x on screen y". If you discover a non-working input field not covered by any of the _un_checked items above, please report them as a comment on this ticket.

I still don't like the SDL_KEYDOWN, SDL_TEXTINPUT: handler in UMain, but rewriting that is something I wouldn't consider until this has been merged for a while.

@barbeque-squared
Copy link
Member Author

I can confirm that this also fixes this problem on Windows (compare with 2023.11.0 at least the portable one has bugs like Space being useless to pause, and Numpad +/- doing -2/+2 in the editor).

I'll go through the unchecked items and fix those, it could be that I'm forgetting some places I just never use but those can always be fixed later. I think the list in the ticket covers all the important places anyway

This was referenced Dec 10, 2023
@barbeque-squared barbeque-squared marked this pull request as ready for review December 14, 2023 18:17
@barbeque-squared
Copy link
Member Author

I think this is ready for testing now. Please test the CI artifact and/or the branch and comment any input fields I've missed (or other input weirdness) on this ticket. The various Options screens, Party mode and Jukebox mode are particularly in need of testing, as those are the areas that I seldom/never use myself.

@barbeque-squared
Copy link
Member Author

I've asked a few people on Discord to test this and they could find no issues. I'm pretty confident that the editor, player names and song selection have no issues, whether you use the mouse or the keyboard or a combination thereof. I'm slightly less confident about Jukebox and Party, because while I did of course fix the obvious things, it's possible I've missed an edge case somewhere.

I'll merge this tomorrow and I guess we'll figure out if/what was missed once 2024.1.0 is out. I do think that having a working editor and pausing with space is more important.

@barbeque-squared barbeque-squared merged commit 6c9645a into master Dec 20, 2023
2 checks passed
@barbeque-squared barbeque-squared deleted the fix-sdl-textinput branch December 20, 2023 10:55
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.

Some keys are triggering twice since SDL 2.28.2 and higher
1 participant