if (kUseBackgroundThread) {
[NSThread detachNewThreadSelector:@selector(updateLoop) toTarget:self withObject:nil];
} else {
displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget:self selector:@selector(updateTVOut)];
[displayLink setFrameInterval:1.0];
[displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
}
if (kUseBackgroundThread) {
[NSThread detachNewThreadSelector:@selector(updateLoop) toTarget:self withObject:nil];
} else {
displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget:self selector:@selector(updateTVOut)];
[displayLink setFrameInterval:1.0];
[displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
}