Show the on-screen keyboard if we don't have active keyboard input

Active keyboard input is based on the input the user has most recently sent.

Fixes https://github.com/libsdl-org/SDL/issues/12595
This commit is contained in:
Sam Lantinga
2025-03-20 15:10:24 -07:00
parent 67b4c3a156
commit cbb83be895
5 changed files with 44 additions and 1 deletions

View File

@@ -5416,7 +5416,7 @@ bool SDL_GetTextInputMultiline(SDL_PropertiesID props)
static bool AutoShowingScreenKeyboard(void)
{
const char *hint = SDL_GetHint(SDL_HINT_ENABLE_SCREEN_KEYBOARD);
if (((!hint || SDL_strcasecmp(hint, "auto") == 0) && !SDL_HasKeyboard()) ||
if (((!hint || SDL_strcasecmp(hint, "auto") == 0) && !SDL_HasActiveKeyboard()) ||
SDL_GetStringBoolean(hint, false)) {
return true;
} else {