SDL: updateKeyboard should use the SDL window's screen instead of the view window's screen, which may be nil.

From 3a9a52fe6c40aee8d174bb756b4a339d35386633 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 6 Jan 2024 07:31:10 -0800
Subject: [PATCH] updateKeyboard should use the SDL window's screen instead of
 the view window's screen, which may be nil.

Fixes https://github.com/libsdl-org/SDL/issues/8200
---
 src/video/uikit/SDL_uikitviewcontroller.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/video/uikit/SDL_uikitviewcontroller.m b/src/video/uikit/SDL_uikitviewcontroller.m
index f1594ed74017..9874b93cfd00 100644
--- a/src/video/uikit/SDL_uikitviewcontroller.m
+++ b/src/video/uikit/SDL_uikitviewcontroller.m
@@ -511,12 +511,14 @@ - (void)textFieldTextDidChange:(NSNotification *)notification
 
 - (void)updateKeyboard
 {
+    SDL_UIKitWindowData *data = (__bridge SDL_UIKitWindowData *) window->driverdata;
+
     CGAffineTransform t = self.view.transform;
     CGPoint offset = CGPointMake(0.0, 0.0);
 #if TARGET_OS_XR
     CGRect frame = UIKit_ComputeViewFrame(window);
 #else
-    CGRect frame = UIKit_ComputeViewFrame(window, self.view.window.screen);
+    CGRect frame = UIKit_ComputeViewFrame(window, data.uiwindow.screen);
 #endif
 
     if (self.keyboardHeight) {