Skip to content

Commit

Permalink
video/uikit: Do not use setNeedsUpdateOfPrefersPointerLocked on iOS S…
Browse files Browse the repository at this point in the history
…DKs older than 14
  • Loading branch information
uyjulian authored and slouken committed Oct 22, 2021
1 parent 8f58bb9 commit 007b546
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/uikit/SDL_uikitwindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,15 @@ - (void)layoutSubviews
UIKit_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
#if !TARGET_OS_TV
#if defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0
@autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
SDL_uikitviewcontroller *viewcontroller = data.viewcontroller;
if (@available(iOS 14.0, *)) {
[viewcontroller setNeedsUpdateOfPrefersPointerLocked];
}
}
#endif /* defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0 */
#endif /* !TARGET_OS_TV */
}

Expand Down

0 comments on commit 007b546

Please sign in to comment.