imgui: Dispatch SDL text input requests to main thread on macOS. #1519
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SDL_StartTextInput
andSDL_StopTextInput
utilize UI APIs that need to be executed from the main thread on macOS. SDL does not seem to handle dispatching itself, nor does it document that these should be executed from the main thread. To handle this without much disturbance, we can just dispatch these calls to the main thread on macOS.I've also reported upstream to SDL to get either a fix or documentation clarification on this: libsdl-org/SDL#11447
Fixes any game using IME input.