Parcourir la source

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.
Sam Lantinga il y a 9 mois
Parent
commit
def7a43a2e
3 fichiers modifiés avec 3 ajouts et 6 suppressions
  1. 2 2
      include/SDL3/SDL_hints.h
  2. 1 1
      src/video/windows/SDL_windowskeyboard.c
  3. 0 3
      test/checkkeys.c

+ 2 - 2
include/SDL3/SDL_hints.h

@@ -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.
  *

+ 1 - 1
src/video/windows/SDL_windowskeyboard.c

@@ -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)

+ 0 - 3
test/checkkeys.c

@@ -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]));