Renamed ShowTextInput/HideTextInput to ShowScreenKeyboard/HideScreenKeyboard on Android

This better reflects the actual implementation and makes SDL_HINT_ENABLE_SCREEN_KEYBOARD work on Android.

Fixes https://github.com/libsdl-org/SDL/issues/8652
This commit is contained in:
Sam Lantinga 2024-01-06 08:11:22 -08:00
parent 3a9a52fe6c
commit 014a63b4b5
6 changed files with 25 additions and 24 deletions

View file

@ -2239,7 +2239,7 @@ int Android_JNI_SuspendScreenSaver(SDL_bool suspend)
return Android_JNI_SendMessage(COMMAND_SET_KEEP_SCREEN_ON, (suspend == SDL_FALSE) ? 0 : 1);
}
void Android_JNI_ShowTextInput(SDL_Rect *inputRect)
void Android_JNI_ShowScreenKeyboard(SDL_Rect *inputRect)
{
JNIEnv *env = Android_JNI_GetEnv();
(*env)->CallStaticBooleanMethod(env, mActivityClass, midShowTextInput,
@ -2249,7 +2249,7 @@ void Android_JNI_ShowTextInput(SDL_Rect *inputRect)
inputRect->h);
}
void Android_JNI_HideTextInput(void)
void Android_JNI_HideScreenKeyboard(void)
{
/* has to match Activity constant */
const int COMMAND_TEXTEDIT_HIDE = 3;