[PR #1519] [MERGED] imgui: Dispatch SDL text input requests to main thread on macOS. #2146

Closed
opened 2026-02-27 21:15:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1519
Author: @squidbus
Created: 11/11/2024
Status: Merged
Merged: 11/12/2024
Merged by: @georgemoralis

Base: mainHead: macos-ime


📝 Commits (1)

  • c30b565 imgui: Dispatch SDL text input requests to main thread on macOS.

📊 Changes

1 file changed (+20 additions, -3 deletions)

View changed files

📝 src/imgui/renderer/imgui_impl_sdl3.cpp (+20 -3)

📄 Description

SDL_StartTextInput and SDL_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: https://github.com/libsdl-org/SDL/issues/11447

Fixes any game using IME input.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/1519 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 11/11/2024 **Status:** ✅ Merged **Merged:** 11/12/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `macos-ime` --- ### 📝 Commits (1) - [`c30b565`](https://github.com/shadps4-emu/shadPS4/commit/c30b56582262afdc34d972174ae9782788589ade) imgui: Dispatch SDL text input requests to main thread on macOS. ### 📊 Changes **1 file changed** (+20 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/imgui/renderer/imgui_impl_sdl3.cpp` (+20 -3) </details> ### 📄 Description `SDL_StartTextInput` and `SDL_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: https://github.com/libsdl-org/SDL/issues/11447 Fixes any game using IME input. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:15:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#2146
No description provided.