mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
Request pointer lock while streaming
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -432,6 +432,10 @@
|
||||
- (BOOL)shouldAutorotate {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)prefersPointerLocked {
|
||||
return YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user