mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 22:23:52 +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
|
// These are derived from the primary view controller
|
||||||
if (@available(iOS 11.0, *)) {
|
if (@available(iOS 11.0, *)) {
|
||||||
// iOS 11 betas (which are still installed in some places :\) crash with
|
[self setNeedsUpdateOfHomeIndicatorAutoHidden];
|
||||||
// doesNotRecognizeSelector since this wasn't added until after the iPhone X
|
[self setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
|
||||||
// announcement.
|
}
|
||||||
if ([self respondsToSelector: @selector(setNeedsUpdateOfHomeIndicatorAutoHidden)]) {
|
if (@available(iOS 14.0, *)) {
|
||||||
[self setNeedsUpdateOfHomeIndicatorAutoHidden];
|
[self setNeedsUpdateOfPrefersPointerLocked];
|
||||||
}
|
|
||||||
if ([self respondsToSelector: @selector(setNeedsUpdateOfScreenEdgesDeferringSystemGestures)]) {
|
|
||||||
[self setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1409,6 +1405,11 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
return _primaryViewController;
|
return _primaryViewController;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (UIViewController*)childViewControllerForPointerLock
|
||||||
|
{
|
||||||
|
return _primaryViewController;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark Animated view controller deployment and layout
|
#pragma mark Animated view controller deployment and layout
|
||||||
|
|
||||||
// Primitive method for view controller deployment and animated layout to the given position.
|
// Primitive method for view controller deployment and animated layout to the given position.
|
||||||
|
|||||||
@@ -432,6 +432,10 @@
|
|||||||
- (BOOL)shouldAutorotate {
|
- (BOOL)shouldAutorotate {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)prefersPointerLocked {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user