From f5b99b6b9c7a95dff3cb4b9cba7a645bcea4ffa7 Mon Sep 17 00:00:00 2001 From: Diego Waxemberg Date: Sun, 26 Aug 2018 11:31:20 -0700 Subject: [PATCH] Can now stream to tvOS --- Limelight/Stream/StreamManager.m | 2 +- Limelight/ViewControllers/StreamFrameViewController.m | 7 +++++++ Moonlight TV/Base.lproj/Main.storyboard | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Limelight/Stream/StreamManager.m b/Limelight/Stream/StreamManager.m index 4c4d14e..37ca8e1 100644 --- a/Limelight/Stream/StreamManager.m +++ b/Limelight/Stream/StreamManager.m @@ -76,7 +76,7 @@ } } -#if TARGET_OS_IPHONE +#if TARGET_OS_IPHONE && !TARGET_OS_TV // Set mouse delta factors from the screen resolution and stream size CGFloat screenScale = [[UIScreen mainScreen] scale]; CGRect screenBounds = [[UIScreen mainScreen] bounds]; diff --git a/Limelight/ViewControllers/StreamFrameViewController.m b/Limelight/ViewControllers/StreamFrameViewController.m index a87fed4..8afa7df 100644 --- a/Limelight/ViewControllers/StreamFrameViewController.m +++ b/Limelight/ViewControllers/StreamFrameViewController.m @@ -26,7 +26,9 @@ { [super viewDidAppear:animated]; +#if !TARGET_OS_TV [[self revealViewController] setPrimaryViewController:self]; +#endif } - (void)viewDidLoad @@ -139,7 +141,9 @@ // Leave the spinner spinning until it's obscured by // the first frame of video. self.stageLabel.hidden = YES; +#if !TARGET_OS_TV [(StreamView*)self.view setupOnScreenControls: self->_controllerSupport swipeDelegate:self]; +#endif }); } @@ -231,6 +235,7 @@ // Dispose of any resources that can be recreated. } +#if !TARGET_OS_TV // Require a confirmation when streaming to activate a system gesture - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures { return UIRectEdgeAll; @@ -239,4 +244,6 @@ - (BOOL)shouldAutorotate { return YES; } +#endif + @end diff --git a/Moonlight TV/Base.lproj/Main.storyboard b/Moonlight TV/Base.lproj/Main.storyboard index 6ca4543..9dcb8e6 100644 --- a/Moonlight TV/Base.lproj/Main.storyboard +++ b/Moonlight TV/Base.lproj/Main.storyboard @@ -55,10 +55,13 @@ + + + - +