mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-21 18:28:47 -04:00
Added Fullscreen to the Right
stuff (YTLitePlus.xm)
This commit is contained in:
@@ -431,6 +431,32 @@ BOOL isTabSelected = NO;
|
||||
}
|
||||
%end
|
||||
|
||||
// Fullscreen to the Right (iPhone-exclusive) - @arichornlover
|
||||
// NOTE: Please turn off the “Portrait Fullscreen” Option in YTLite while the option "Fullscreen to the Right" is enabled below.
|
||||
%group gFullscreenToTheRight
|
||||
%hook YTWatchViewController
|
||||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
|
||||
if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
return UIInterfaceOrientationLandscapeRight;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||
if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
return UIInterfaceOrientationMaskLandscape;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%new
|
||||
- (void)forceRightFullscreenOrientation {
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight];
|
||||
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
|
||||
}
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// YTTapToSeek - https://github.com/bhackel/YTTapToSeek
|
||||
%group gYTTapToSeek
|
||||
%hook YTInlinePlayerBarContainerView
|
||||
@@ -716,6 +742,9 @@ BOOL isTabSelected = NO;
|
||||
if (IsEnabled(@"fixCasting_enabled")) {
|
||||
%init(gFixCasting);
|
||||
}
|
||||
if (IsEnabled(@"fullscreenToTheRight_enabled")) {
|
||||
%init(gFullscreenToTheRight);
|
||||
}
|
||||
if (IsEnabled(@"YTTapToSeek_enabled")) {
|
||||
%init(gYTTapToSeek);
|
||||
}
|
||||
|
Reference in New Issue
Block a user