Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android SDL2 2.30.[0|1] regression for ...IsTextInput... functions #9240

Open
312937 opened this issue Mar 10, 2024 · 5 comments
Open

Android SDL2 2.30.[0|1] regression for ...IsTextInput... functions #9240

312937 opened this issue Mar 10, 2024 · 5 comments
Assignees
Milestone

Comments

@312937
Copy link

312937 commented Mar 10, 2024

Sorry to bother you...

Target: Android
SDL2 version: 2.30.0/2.30.1 comparing to 2.28.5 and before
weak relation to issue 9202

Observed on any Android application:

  • The behaviour and function is not backwards compatible
    • SDL_bool SDL_IsTextInputActive(void); works different than before
    • SDL_bool SDL_IsTextInputShown(void); is unreliable
      In other words:
  • None of the functions above allows to retrieve the state of the on-screen keyboard (shown/hidden) NOW.

void SDL_StartTextInput(void); and void SDL_StopTextInput(void); both work as before.

@slouken
Copy link
Collaborator

slouken commented Mar 10, 2024

Can you describe how they work differently?

@slouken slouken added this to the 2.32.0 milestone Mar 10, 2024
@312937
Copy link
Author

312937 commented Mar 10, 2024

  1. Up to my recollection: SDL_IsTextInputActive was delivering the state of on-screen keyboard before 2.30.*. It seems to deliver always TRUE with 2.30.* (at least in the initial state no matter whether keyboard is shown or not).
  2. With 2.30.* I've noticed SDL_IsTextInputShown delivers FALSE.
    My difficulty is no functional description as well (difference between shown and active). Thus, I might have misinterpreted the intention.
  3. Trying 2.30.1 I've checked shortly both and could not grasp the real function behind.

In between, I moved back to 2.28.5 to avoid the difficulty.
Usage note: Currently (i.e., using 2.28.5), I apply SDL_IsTextInputActive to recognise whether the on-screen keyboard displayed or hidden. This might have been a mistake though it worked reliable the last few years.

I feel really sorry if the provided description is missing deterministic technical details, but I may hardly come back to the isssue at the moment due to my professional work-load.

@slouken
Copy link
Collaborator

slouken commented Mar 10, 2024

These details are enough to understand the issue, thanks!

@slouken slouken self-assigned this Mar 10, 2024
@slouken
Copy link
Collaborator

slouken commented Mar 10, 2024

I think what you want is SDL_IsScreenKeyboardShown()

@expikr
Copy link
Contributor

expikr commented Mar 11, 2024

potentially related: love2d/love#2031 (comment) and #9215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants