Permalink
Browse files

iOS 4 VGA TVOut

  • Loading branch information...
nst committed Nov 4, 2010
1 parent cbd44d6 commit 5f0077e5193ada0872d3631f6c90914caf8c12cc

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -8,48 +8,40 @@
//
#import "SpyPhoneAppDelegate.h"
#import "TVOutManager.h"
//
//@interface UIApplication (tvout)
//- (void) startTVOut;
//@end
//
@implementation SpyPhoneAppDelegate
@synthesize window;
@synthesize tabBarController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Add the tab bar controller's current view as a subview of the window
[window addSubview:tabBarController.view];
// BOOL isTVOutEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"TVOutEnabled"];
// if(isTVOutEnabled) {
// [[TVOutManager sharedInstance] startTVOut];
// }
}
/*
// Optional UITabBarControllerDelegate method
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
}
*/
/*
// Optional UITabBarControllerDelegate method
- (void)tabBarController:(UITabBarController *)tabBarController didEndCustomizingViewControllers:(NSArray *)viewControllers changed:(BOOL)changed {
}
*/
- (void)dealloc {
[tabBarController release];
[window release];
[super dealloc];
}
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Add the tab bar controller's current view as a subview of the window
[window addSubview:tabBarController.view];
/*
// FIXME: TVOut does not work so well
1. start SP, suspend
2. plug
3. start SP, suspend
4. start SP, SP quits
5. start SP
*/
BOOL isTVOutEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"TVOutEnabled"];
if(isTVOutEnabled) {
[TVOutManager sharedInstance].tvSafeMode = NO;
[[TVOutManager sharedInstance] startTVOut];
}
}
@end
View
@@ -0,0 +1,38 @@
//
// TVOutManager.h
// TVOutOS4Test
//
// Created by Rob Terrell (rob@touchcentric.com) on 8/16/10.
// Copyright 2010 TouchCentric LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface TVOutManager : NSObject {
UIWindow* deviceWindow;
UIWindow* tvoutWindow;
NSTimer *updateTimer;
UIImage *image;
UIImageView *mirrorView;
BOOL done;
BOOL tvSafeMode;
CGAffineTransform startingTransform;
}
@property(assign) BOOL tvSafeMode;
+ (TVOutManager *)sharedInstance;
- (void) startTVOut;
- (void) stopTVOut;
- (void) updateTVOut;
- (void) updateLoop;
- (void) screenDidConnectNotification: (NSNotification*) notification;
- (void) screenDidDisconnectNotification: (NSNotification*) notification;
- (void) screenModeDidChangeNotification: (NSNotification*) notification;
- (void) deviceOrientationDidChange: (NSNotification*) notification;
@end
Oops, something went wrong.

0 comments on commit 5f0077e

Please sign in to comment.