video: Remove SDL_GetFocusWindow()

It was rarely used and performed an identical function to SDL_GetKeyboardFocus(), but with worse time complexity.
This commit is contained in:
Frank Praznik
2023-09-16 15:36:01 -04:00
parent 39c2f97373
commit e5739d7d1f
9 changed files with 27 additions and 37 deletions

View File

@@ -624,7 +624,7 @@ SDL_bool UIKit_IsScreenKeyboardShown(SDL_VideoDevice *_this, SDL_Window *window)
int UIKit_SetTextInputRect(SDL_VideoDevice *_this, const SDL_Rect *rect)
{
@autoreleasepool {
SDL_uikitviewcontroller *vc = GetWindowViewController(SDL_GetFocusWindow());
SDL_uikitviewcontroller *vc = GetWindowViewController(SDL_GetKeyboardFocus());
if (vc != nil) {
vc.textInputRect = *rect;