From 13933222eef79a706bfdc0ebc48f5d9cae4dbef5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 24 Mar 2024 11:36:25 -0700 Subject: [PATCH] Fixed string comparison (thanks @meyraud705!) --- src/video/SDL_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index d3c336990..a60602e37 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -4798,7 +4798,7 @@ void SDL_StartTextInput(void) /* Show the on-screen keyboard, if desired */ const char *hint = SDL_GetHint(SDL_HINT_ENABLE_SCREEN_KEYBOARD); - if (((!hint || SDL_strcasecmp(hint, "auto")) && !SDL_HasKeyboard()) || + if (((!hint || SDL_strcasecmp(hint, "auto") == 0) && !SDL_HasKeyboard()) || SDL_GetStringBoolean(hint, SDL_FALSE)) { SDL_Window *window = SDL_GetKeyboardFocus(); if (window && _this->ShowScreenKeyboard) { @@ -4847,7 +4847,7 @@ void SDL_StopTextInput(void) /* Hide the on-screen keyboard, if desired */ const char *hint = SDL_GetHint(SDL_HINT_ENABLE_SCREEN_KEYBOARD); - if (((!hint || SDL_strcasecmp(hint, "auto")) && !SDL_HasKeyboard()) || + if (((!hint || SDL_strcasecmp(hint, "auto") == 0) && !SDL_HasKeyboard()) || SDL_GetStringBoolean(hint, SDL_FALSE)) { SDL_Window *window = SDL_GetKeyboardFocus(); if (window && _this->HideScreenKeyboard) {