Disable OnScreenKeyboardOverlapsGameWindow
on iOS when hardware keyboard is attached
#6407
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Noticed while working on fixing iOS hardware keyboard issues. When a hardware keyboard is attached, the software keyboard no longer shows and "overlaps with the game window", so it's more ideal for the
OnScreenKeyboardOverlapsGameWindow
flag to remain false in that case, so that search text boxes on osu! still gain focus when they are present (i.e. when opening song select or opening settings overlay).An Android companion to this should be in place if this change can be agreed upon.
Also note that this implementation can be simply replaced with
!SDL_HasKeyboard()
, and we can also just replace these overrides with a single override atSDLGameHost
that returns!SDL_HasKeyboard()
(usually always false on desktop platforms, and true on mobile platforms if there are no hardware keyboards attached). I can go with that approach if it makes more sense (although I would have to test if it actually works as expected).