-
Notifications
You must be signed in to change notification settings - Fork 87
Refactor SDL input code to fix menu exit #146
Conversation
@paradust7 Please let me know if you have some feedback for this approach. Thanks! |
This PR is ready for review. I've fixed all the regressions I could find. |
Why are we adding a new, different method now? We have a working IME model that (as far as I can tell) SDL just needs to use, please read #144 (comment). |
Sorry, that was an unnecessary idea by me, I was stupid and didn't read carefully enough.
If I understand correctly, starting and stopping SDL text input doesn't solve the issue. It just en-/disables the extra text events. But the issue is that there are also key events that cause keybindings in minetest to be triggered, i.e. inventory key. According to libsdl-org/SDL#2897 (and libsdl-org/SDL#4739), text input is on by default anyway. |
@sfan5 I went back to the original plan, thanks. Let me know how it looks now. |
Side note: CI decided not to run (cancelled itself) on macos. Not sure why or how to fix. |
I squashed the commits together, hopefully now CI decides to run. |
CI builds well now, let me know if there's anything else to be done. |
@sfan5 I've had to remove const when adding static, let me know if that works. |
@Desour if you have the time, can you confirm for me whether this works? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested.
Works fine otherwise.
Btw. just FYI, @ndren, the const after a member function is for the implicit |
@Desour Thanks for the clarification and testing! |
@Desour Can you confirm this works with the new SDL check included? |
👍 Works. |
Continued from #144, includes KEY_RETURN.