mirror of https://github.com/libsdl-org/SDL.git
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
This commit is contained in:
parent
e100992c17
commit
3a9a52fe6c
|
|
@ -511,12 +511,14 @@ static void SDLCALL SDL_HideHomeIndicatorHintChanged(void *userdata, const char
|
||||||
|
|
||||||
- (void)updateKeyboard
|
- (void)updateKeyboard
|
||||||
{
|
{
|
||||||
|
SDL_UIKitWindowData *data = (__bridge SDL_UIKitWindowData *) window->driverdata;
|
||||||
|
|
||||||
CGAffineTransform t = self.view.transform;
|
CGAffineTransform t = self.view.transform;
|
||||||
CGPoint offset = CGPointMake(0.0, 0.0);
|
CGPoint offset = CGPointMake(0.0, 0.0);
|
||||||
#if TARGET_OS_XR
|
#if TARGET_OS_XR
|
||||||
CGRect frame = UIKit_ComputeViewFrame(window);
|
CGRect frame = UIKit_ComputeViewFrame(window);
|
||||||
#else
|
#else
|
||||||
CGRect frame = UIKit_ComputeViewFrame(window, self.view.window.screen);
|
CGRect frame = UIKit_ComputeViewFrame(window, data.uiwindow.screen);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (self.keyboardHeight) {
|
if (self.keyboardHeight) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue