Only clear IME display options if SDL_HINT_IME_SHOW_UI is off (thanks opxdo!) Fixes https://github.com/libsdl-org/SDL/issues/5153
diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c
index 6cbf495..d653d89 100644
--- a/src/video/windows/SDL_windowskeyboard.c
+++ b/src/video/windows/SDL_windowskeyboard.c
@@ -910,7 +910,9 @@ IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoD
IME_InputLangChanged(videodata);
break;
case WM_IME_SETCONTEXT:
- *lParam = 0;
+ if (videodata->ime_uiless) {
+ *lParam = 0;
+ }
break;
case WM_IME_STARTCOMPOSITION:
trap = SDL_TRUE;