diff --git a/Limelight/Database/TemporarySettings.m b/Limelight/Database/TemporarySettings.m index dcef089..4ed3f92 100644 --- a/Limelight/Database/TemporarySettings.m +++ b/Limelight/Database/TemporarySettings.m @@ -15,18 +15,57 @@ self.parent = settings; +#if TARGET_OS_TV + NSInteger _bitrate = [[NSUserDefaults standardUserDefaults] integerForKey:@"bitrate"]; + NSInteger _framerate = [[NSUserDefaults standardUserDefaults] integerForKey:@"framerate"]; + + if (_bitrate) { + self.bitrate = [NSNumber numberWithInteger:_bitrate]; + } else { + self.bitrate = [NSNumber numberWithInteger:20000]; + } + + if (_framerate) { + self.framerate = [NSNumber numberWithInteger:_framerate]; + } else { + self.framerate = [NSNumber numberWithInteger:60]; + } + + self.useHevc = [[NSUserDefaults standardUserDefaults] boolForKey:@"useHevc"] || NO; + self.playAudioOnPC = [[NSUserDefaults standardUserDefaults] boolForKey:@"audioOnPC"] || NO; + self.enableHdr = [[NSUserDefaults standardUserDefaults] boolForKey:@"enableHdr"] || NO; + self.optimizeGames = [[NSUserDefaults standardUserDefaults] boolForKey:@"optimizeGames"] || YES; + self.multiController = YES; + NSInteger _screenSize = [[NSUserDefaults standardUserDefaults] integerForKey:@"streamResolution"]; + switch (_screenSize) { + case 0: + self.height = [NSNumber numberWithInteger:720]; + self.width = [NSNumber numberWithInteger:1280]; + break; + case 2: + self.height = [NSNumber numberWithInteger:2160]; + self.width = [NSNumber numberWithInteger:3840]; + break; + case 1: + default: + self.height = [NSNumber numberWithInteger:1080]; + self.width = [NSNumber numberWithInteger:1920]; + break; + } +#else self.bitrate = settings.bitrate; self.framerate = settings.framerate; self.height = settings.height; self.width = settings.width; - self.onscreenControls = settings.onscreenControls; - self.uniqueId = settings.uniqueId; - self.streamingRemotely = settings.streamingRemotely; self.useHevc = settings.useHevc; - self.multiController = settings.multiController; self.playAudioOnPC = settings.playAudioOnPC; self.enableHdr = settings.enableHdr; self.optimizeGames = settings.optimizeGames; + self.multiController = settings.multiController; +#endif + self.onscreenControls = settings.onscreenControls; + self.uniqueId = settings.uniqueId; + self.streamingRemotely = settings.streamingRemotely; return self; } diff --git a/Limelight/UIAppView.m b/Limelight/UIAppView.m index 03094eb..6be1b6c 100644 --- a/Limelight/UIAppView.m +++ b/Limelight/UIAppView.m @@ -32,7 +32,11 @@ static UIImage* noImage; noImage = [UIImage imageNamed:@"NoAppImage"]; } +#if TARGET_OS_TV + _appButton = [UIButton buttonWithType:UIButtonTypeSystem]; +#else _appButton = [UIButton buttonWithType:UIButtonTypeCustom]; +#endif [_appButton setBackgroundImage:noImage forState:UIControlStateNormal]; [_appButton setContentEdgeInsets:UIEdgeInsetsMake(0, 4, 0, 4)]; [_appButton sizeToFit]; @@ -64,10 +68,12 @@ static UIImage* noImage; if ([_app.id isEqualToString:_app.host.currentGame]) { // Only create the app overlay if needed _appOverlay = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Play"]]; +#if !TARGET_OS_TV _appOverlay.layer.shadowColor = [UIColor blackColor].CGColor; _appOverlay.layer.shadowOffset = CGSizeMake(0, 0); _appOverlay.layer.shadowOpacity = 1; _appOverlay.layer.shadowRadius = 2.0; +#endif [self addSubview:_appOverlay]; @@ -91,8 +97,20 @@ static UIImage* noImage; // TODO: Improve no-app image detection if (!(appImage.size.width == 130.f && appImage.size.height == 180.f) && // GFE 2.0 !(appImage.size.width == 628.f && appImage.size.height == 888.f)) { // GFE 3.0 +#if TARGET_OS_TV + //custom image to do TvOS hover popup effect + UIImageView *imageView = [[UIImageView alloc] initWithImage:appImage]; + imageView.userInteractionEnabled = YES; + imageView.adjustsImageWhenAncestorFocused = YES; + imageView.frame = CGRectMake(0, 0, 200, 265); + [_appButton addSubview:imageView]; + + _appButton.frame = CGRectMake(0, 0, 200, 265); + self.frame = CGRectMake(0, 0, 200, 265); +#else _appButton.frame = CGRectMake(0, 0, appImage.size.width / 2, appImage.size.height / 2); self.frame = CGRectMake(0, 0, appImage.size.width / 2, appImage.size.height / 2); +#endif _appOverlay.frame = CGRectMake(0, 0, self.frame.size.width / 2.f, self.frame.size.height / 4.f); _appOverlay.layer.shadowRadius = 4.0; [_appOverlay setCenter:CGPointMake(self.frame.size.width/2, self.frame.size.height/6)]; @@ -107,18 +125,35 @@ static UIImage* noImage; if (noAppImage) { _appLabel = [[UILabel alloc] init]; - CGFloat padding = 4.f; - [_appLabel setFrame: CGRectMake(padding, padding, _appButton.frame.size.width - 2 * padding, _appButton.frame.size.height - 2 * padding)]; [_appLabel setTextColor:[UIColor whiteColor]]; [_appLabel setBaselineAdjustment:UIBaselineAdjustmentAlignCenters]; [_appLabel setTextAlignment:NSTextAlignmentCenter]; [_appLabel setLineBreakMode:NSLineBreakByWordWrapping]; [_appLabel setNumberOfLines:0]; + [_appLabel setText:_app.name]; #if TARGET_OS_TV [_appLabel setFont:[UIFont systemFontOfSize:16]]; -#endif - [_appLabel setText:_app.name]; + [_appLabel setAdjustsFontSizeToFitWidth:YES]; + [_appLabel setFrame: CGRectMake(0, 0, 200, 265)]; + //custom image to do TvOS hover popup effect + UIImageView *imageView = [[UIImageView alloc] initWithImage:appImage]; + imageView.userInteractionEnabled = YES; + imageView.adjustsImageWhenAncestorFocused = YES; + imageView.frame = CGRectMake(0, 0, 200, 265); + UIGraphicsBeginImageContextWithOptions(_appLabel.frame.size, false, 0); + [imageView.layer renderInContext:(UIGraphicsGetCurrentContext())]; + [_appLabel.layer renderInContext:(UIGraphicsGetCurrentContext())]; + UIImage *imageWithText = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + [imageView setImage:imageWithText]; + [_appButton addSubview:imageView]; + _appButton.frame = CGRectMake(0, 0, 200, 265); + self.frame = CGRectMake(0, 0, 200, 265); +#else + CGFloat padding = 4.f; + [_appLabel setFrame: CGRectMake(padding, padding, _appButton.frame.size.width - 2 * padding, _appButton.frame.size.height - 2 * padding)]; [_appButton addSubview:_appLabel]; +#endif } } diff --git a/Limelight/UIComputerView.m b/Limelight/UIComputerView.m index dc1dfe4..7ab9574 100644 --- a/Limelight/UIComputerView.m +++ b/Limelight/UIComputerView.m @@ -54,7 +54,9 @@ static const int LABEL_DY = 20; [_hostLabel setText:@"Add Host"]; [_hostLabel sizeToFit]; +#if !TARGET_OS_TV _hostLabel.textColor = [UIColor whiteColor]; +#endif _hostLabel.center = CGPointMake(_hostButton.frame.origin.x + (_hostButton.frame.size.width / 2), _hostButton.frame.origin.y + _hostButton.frame.size.height + LABEL_DY); UIImageView* addIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"AddComputerIcon"]]; @@ -128,7 +130,9 @@ static const int LABEL_DY = 20; - (void) updateContentsForHost:(TemporaryHost*)host { _hostLabel.text = _host.name; +#if !TARGET_OS_TV _hostLabel.textColor = [UIColor whiteColor]; +#endif [_hostLabel sizeToFit]; switch (host.pairState) { @@ -142,7 +146,9 @@ static const int LABEL_DY = 20; _hostPairState.text = @"Paired"; break; } +#if !TARGET_OS_TV _hostPairState.textColor = [UIColor whiteColor]; +#endif [_hostPairState sizeToFit]; if (host.online) { diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index ceb74ec..ed9b27d 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -1001,9 +1001,8 @@ static NSMutableSet* hostList; cell.layer.shadowOpacity = 0.5f; cell.layer.shadowPath = shadowPath.CGPath; - cell.layer.borderWidth = 1; - #if !TARGET_OS_TV + cell.layer.borderWidth = 1; cell.layer.borderColor = [[UIColor colorWithRed:0 green:0 blue:0 alpha:0.3f] CGColor]; cell.exclusiveTouch = YES; #endif @@ -1055,12 +1054,20 @@ static NSMutableSet* hostList; self.navigationController.navigationBar.topItem.rightBarButtonItem.enabled = YES; } +#if TARGET_OS_TV +- (BOOL)canBecomeFocused { + return YES; +} +#endif + - (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator { +#if !TARGET_OS_TV if (context.nextFocusedView != nil) { [context.nextFocusedView setAlpha:0.8]; } [context.previouslyFocusedView setAlpha:1.0]; +#endif } @end diff --git a/Limelight/ViewControllers/StreamFrameViewController.h b/Limelight/ViewControllers/StreamFrameViewController.h index f9bf163..77aaea5 100644 --- a/Limelight/ViewControllers/StreamFrameViewController.h +++ b/Limelight/ViewControllers/StreamFrameViewController.h @@ -12,7 +12,13 @@ #import +#if TARGET_OS_TV +@import GameController; + +@interface StreamFrameViewController : GCEventViewController +#else @interface StreamFrameViewController : UIViewController +#endif @property (strong, nonatomic) IBOutlet UILabel *stageLabel; @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *spinner; @property (nonatomic) StreamConfiguration* streamConfig; diff --git a/Limelight/ViewControllers/StreamFrameViewController.m b/Limelight/ViewControllers/StreamFrameViewController.m index f0c96b4..75fe0c1 100644 --- a/Limelight/ViewControllers/StreamFrameViewController.m +++ b/Limelight/ViewControllers/StreamFrameViewController.m @@ -20,6 +20,8 @@ ControllerSupport *_controllerSupport; StreamManager *_streamMan; NSTimer *_inactivityTimer; + UITapGestureRecognizer *_menuGestureRecognizer; + UITapGestureRecognizer *_menuDoubleTapGestureRecognizer; } - (void)viewDidAppear:(BOOL)animated @@ -31,6 +33,15 @@ #endif } +#ifdef TARGET_OS_TV +- (void)controllerPauseButtonPressed:(id)sender { } +- (void)controllerPauseButtonDoublePressed:(id)sender { + Log(LOG_I, @"Menu double-pressed -- backing out of stream"); + [self returnToMainFrame]; +} +#endif + + - (void)viewDidLoad { [super viewDidLoad]; @@ -46,6 +57,21 @@ _controllerSupport = [[ControllerSupport alloc] initWithConfig:self.streamConfig]; _inactivityTimer = nil; +#if TARGET_OS_TV + if (!_menuGestureRecognizer || !_menuDoubleTapGestureRecognizer) { + _menuGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(controllerPauseButtonPressed:)]; + _menuGestureRecognizer.allowedPressTypes = @[@(UIPressTypeMenu)]; + + _menuDoubleTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(controllerPauseButtonDoublePressed:)]; + _menuDoubleTapGestureRecognizer.numberOfTapsRequired = 2; + [_menuGestureRecognizer requireGestureRecognizerToFail:_menuDoubleTapGestureRecognizer]; + _menuDoubleTapGestureRecognizer.allowedPressTypes = @[@(UIPressTypeMenu)]; + } + + [self.view addGestureRecognizer:_menuGestureRecognizer]; + [self.view addGestureRecognizer:_menuDoubleTapGestureRecognizer]; +#endif + _streamMan = [[StreamManager alloc] initWithConfig:self.streamConfig renderView:self.view connectionCallbacks:self]; diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json index 48ecb4f..6707298 100644 --- a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +++ b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -1,7 +1,8 @@ { "images" : [ { - "idiom" : "tv" + "idiom" : "tv", + "filename" : "bg-app.jpg" } ], "info" : { diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/bg-app.jpg b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/bg-app.jpg new file mode 100644 index 0000000..7d956c0 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/bg-app.jpg differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json index 48ecb4f..ece4178 100644 --- a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +++ b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -1,7 +1,8 @@ { "images" : [ { - "idiom" : "tv" + "idiom" : "tv", + "filename" : "wedges-app.png" } ], "info" : { diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/wedges-app.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/wedges-app.png new file mode 100644 index 0000000..6704ca2 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/wedges-app.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json index 16a370d..f103f41 100644 --- a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +++ b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -2,10 +2,12 @@ "images" : [ { "idiom" : "tv", + "filename" : "bg.jpg", "scale" : "1x" }, { "idiom" : "tv", + "filename" : "bg@2.jpg", "scale" : "2x" } ], diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/bg.jpg b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/bg.jpg new file mode 100644 index 0000000..0981c46 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/bg.jpg differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/bg@2.jpg b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/bg@2.jpg new file mode 100644 index 0000000..e28bef7 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/bg@2.jpg differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json index 16a370d..2bddca3 100644 --- a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +++ b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -2,10 +2,12 @@ "images" : [ { "idiom" : "tv", + "filename" : "Wedges.png", "scale" : "1x" }, { "idiom" : "tv", + "filename" : "Wedges@2.png", "scale" : "2x" } ], diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Wedges.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Wedges.png new file mode 100644 index 0000000..c45bdb3 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Wedges.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Wedges@2.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Wedges@2.png new file mode 100644 index 0000000..925cc3a Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Wedges@2.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json index 7dc9502..44273a5 100644 --- a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +++ b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -2,18 +2,22 @@ "images" : [ { "idiom" : "tv", + "filename" : "topshelf-wide@1.png", "scale" : "1x" }, { "idiom" : "tv", + "filename" : "topshelf-wide@2.png", "scale" : "2x" }, { "idiom" : "tv-marketing", + "filename" : "topshelf-wide@1-1.png", "scale" : "1x" }, { "idiom" : "tv-marketing", + "filename" : "topshelf-wide@2-1.png", "scale" : "2x" } ], diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@1-1.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@1-1.png new file mode 100644 index 0000000..a14ef59 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@1-1.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@1.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@1.png new file mode 100644 index 0000000..a14ef59 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@1.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@2-1.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@2-1.png new file mode 100644 index 0000000..5e532f4 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@2-1.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@2.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@2.png new file mode 100644 index 0000000..5e532f4 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/topshelf-wide@2.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json index 7dc9502..bd8b0b6 100644 --- a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +++ b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -2,18 +2,22 @@ "images" : [ { "idiom" : "tv", + "filename" : "topshelf@1.png", "scale" : "1x" }, { "idiom" : "tv", + "filename" : "topshelf@2.png", "scale" : "2x" }, { "idiom" : "tv-marketing", + "filename" : "topshelf@1-1.png", "scale" : "1x" }, { "idiom" : "tv-marketing", + "filename" : "topshelf@2-1.png", "scale" : "2x" } ], diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@1-1.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@1-1.png new file mode 100644 index 0000000..99646a7 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@1-1.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@1.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@1.png new file mode 100644 index 0000000..99646a7 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@1.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@2-1.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@2-1.png new file mode 100644 index 0000000..830a274 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@2-1.png differ diff --git a/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@2.png b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@2.png new file mode 100644 index 0000000..830a274 Binary files /dev/null and b/Moonlight TV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/topshelf@2.png differ diff --git a/Moonlight TV/Base.lproj/Main.storyboard b/Moonlight TV/Base.lproj/Main.storyboard index 80a6980..2645447 100644 --- a/Moonlight TV/Base.lproj/Main.storyboard +++ b/Moonlight TV/Base.lproj/Main.storyboard @@ -1,11 +1,11 @@ - + - + @@ -39,7 +39,6 @@ - diff --git a/Moonlight TV/Settings.bundle/Root.plist b/Moonlight TV/Settings.bundle/Root.plist new file mode 100644 index 0000000..1ca6b0d --- /dev/null +++ b/Moonlight TV/Settings.bundle/Root.plist @@ -0,0 +1,143 @@ + + + + + StringsTable + Root + PreferenceSpecifiers + + + Type + PSGroupSpecifier + Title + Host Configuration + + + Type + PSToggleSwitchSpecifier + DefaultValue + + Title + Play Audio on Host PC + Key + audioOnPC + + + TrueValue + Optimize Games + FalseValue + Off + Type + PSToggleSwitchSpecifier + Title + Optimize Games + Key + optimizeGames + DefaultValue + + + + Type + PSToggleSwitchSpecifier + Title + HEVC Video + Key + useHevc + DefaultValue + + + + Type + PSToggleSwitchSpecifier + Title + Enable HDR + Key + enableHdr + DefaultValue + + + + Type + PSGroupSpecifier + Title + Stream Configuration + + + Type + PSMultiValueSpecifier + Title + Stream Resolution + Key + streamResolution + DefaultValue + 1 + Values + + 0 + 1 + 2 + + Titles + + 720p + 1080p + 4K + + + + Type + PSMultiValueSpecifier + Title + Frame Rate + Key + framerate + DefaultValue + 60 + Values + + 30 + 60 + + Titles + + 30 FPS + 60 FPS + + + + Type + PSMultiValueSpecifier + Title + Bitrate + Key + bitrate + DefaultValue + 10000 + Titles + + 0.5 Mbps + 1 Mbps + 2 Mbps + 5 Mbps + 10 Mbps + 20 Mbps + 25 Mbps + 50 Mbps + 100 Mbps + + Values + + 500 + 1000 + 2000 + 5000 + 10000 + 20000 + 25000 + 50000 + 100000 + + + + + diff --git a/Moonlight TV/Settings.bundle/en.lproj/Root.strings b/Moonlight TV/Settings.bundle/en.lproj/Root.strings new file mode 100644 index 0000000..8cd87b9 Binary files /dev/null and b/Moonlight TV/Settings.bundle/en.lproj/Root.strings differ diff --git a/Moonlight.xcodeproj/project.pbxproj b/Moonlight.xcodeproj/project.pbxproj index dc484dd..82ebeef 100644 --- a/Moonlight.xcodeproj/project.pbxproj +++ b/Moonlight.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 693B3A9B218638CD00982F7B /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 693B3A9A218638CD00982F7B /* Settings.bundle */; }; 9832D1361BBCD5C50036EF48 /* TemporaryApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9832D1351BBCD5C50036EF48 /* TemporaryApp.m */; }; 9865DC30213260B40005B9B9 /* libmoonlight-common-tv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB1A68152132509400507771 /* libmoonlight-common-tv.a */; }; 9865DC31213260F10005B9B9 /* mkcert.c in Sources */ = {isa = PBXBuildFile; fileRef = FB89460719F646E200339C8A /* mkcert.c */; }; @@ -160,6 +161,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 693B3A9A218638CD00982F7B /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; 98132E8C20BC9A62007A053F /* Moonlight v1.1.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.1.xcdatamodel"; sourceTree = ""; }; 9832D1341BBCD5C50036EF48 /* TemporaryApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TemporaryApp.h; path = Database/TemporaryApp.h; sourceTree = ""; }; 9832D1351BBCD5C50036EF48 /* TemporaryApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TemporaryApp.m; path = Database/TemporaryApp.m; sourceTree = ""; }; @@ -440,6 +442,7 @@ FB1A67612132419A00507771 /* Assets.xcassets */, FB1A67632132419A00507771 /* Info.plist */, FB1A67642132419A00507771 /* main.m */, + 693B3A9A218638CD00982F7B /* Settings.bundle */, ); path = "Moonlight TV"; sourceTree = ""; @@ -968,6 +971,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 693B3A9B218638CD00982F7B /* Settings.bundle in Resources */, FB1A681E21328A1B00507771 /* Images.xcassets in Resources */, FB1A67622132419A00507771 /* Assets.xcassets in Resources */, FB1A67602132419700507771 /* Main.storyboard in Resources */,