diff --git a/Limelight/ViewControllers/SWRevealViewController.m b/Limelight/ViewControllers/SWRevealViewController.m index cbaa6a4..c5e6b1c 100755 --- a/Limelight/ViewControllers/SWRevealViewController.m +++ b/Limelight/ViewControllers/SWRevealViewController.m @@ -1387,15 +1387,11 @@ const int FrontViewPositionNone = 0xff; // These are derived from the primary view controller if (@available(iOS 11.0, *)) { - // iOS 11 betas (which are still installed in some places :\) crash with - // doesNotRecognizeSelector since this wasn't added until after the iPhone X - // announcement. - if ([self respondsToSelector: @selector(setNeedsUpdateOfHomeIndicatorAutoHidden)]) { - [self setNeedsUpdateOfHomeIndicatorAutoHidden]; - } - if ([self respondsToSelector: @selector(setNeedsUpdateOfScreenEdgesDeferringSystemGestures)]) { - [self setNeedsUpdateOfScreenEdgesDeferringSystemGestures]; - } + [self setNeedsUpdateOfHomeIndicatorAutoHidden]; + [self setNeedsUpdateOfScreenEdgesDeferringSystemGestures]; + } + if (@available(iOS 14.0, *)) { + [self setNeedsUpdateOfPrefersPointerLocked]; } } @@ -1409,6 +1405,11 @@ const int FrontViewPositionNone = 0xff; return _primaryViewController; } +- (UIViewController*)childViewControllerForPointerLock +{ + return _primaryViewController; +} + #pragma mark Animated view controller deployment and layout // Primitive method for view controller deployment and animated layout to the given position. diff --git a/Limelight/ViewControllers/StreamFrameViewController.m b/Limelight/ViewControllers/StreamFrameViewController.m index 782e973..a97990a 100644 --- a/Limelight/ViewControllers/StreamFrameViewController.m +++ b/Limelight/ViewControllers/StreamFrameViewController.m @@ -432,6 +432,10 @@ - (BOOL)shouldAutorotate { return YES; } + +- (BOOL)prefersPointerLocked { + return YES; +} #endif @end