SDL_HINT_IME_SHOW_UI defaults to SDL_TRUE

This hint is currently only used on Windows, and this matches the behavior of other platforms.
This commit is contained in:
Sam Lantinga 2024-06-24 19:32:11 -07:00
parent 382494eeda
commit def7a43a2e
3 changed files with 3 additions and 6 deletions

View File

@ -966,8 +966,8 @@ extern "C" {
*
* The variable can be set to the following values:
*
* - "0": Native UI components are not display. (default)
* - "1": Native UI components are displayed.
* - "0": Native UI components are not display.
* - "1": Native UI components are displayed. (default)
*
* This hint should be set before SDL is initialized.
*

View File

@ -365,7 +365,7 @@ static void UILess_DisableUIUpdates(SDL_VideoData *videodata);
static SDL_bool WIN_ShouldShowNativeUI()
{
return SDL_GetHintBoolean(SDL_HINT_IME_SHOW_UI, SDL_FALSE);
return SDL_GetHintBoolean(SDL_HINT_IME_SHOW_UI, SDL_TRUE);
}
static int IME_Init(SDL_VideoData *videodata, HWND hwnd)

View File

@ -540,9 +540,6 @@ int main(int argc, char *argv[])
}
#endif
/* Enable showing IME candidates */
SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
for (i = 0; i < state->num_windows; ++i) {
UpdateTextWindowInputRect(SDL_GetWindowID(state->windows[i]));