| 1 | /* |
|---|
| 2 | * SapphireLayerController.m |
|---|
| 3 | * Sapphire |
|---|
| 4 | * |
|---|
| 5 | * Created by Graham Booker on Oct. 29, 2007. |
|---|
| 6 | * Copyright 2007 Sapphire Development Team and/or www.nanopi.net |
|---|
| 7 | * All rights reserved. |
|---|
| 8 | * |
|---|
| 9 | * This program is free software; you can redistribute it and/or modify it under the terms of the GNU |
|---|
| 10 | * General Public License as published by the Free Software Foundation; either version 3 of the License, |
|---|
| 11 | * or (at your option) any later version. |
|---|
| 12 | * |
|---|
| 13 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
|---|
| 14 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|---|
| 15 | * Public License for more details. |
|---|
| 16 | * |
|---|
| 17 | * You should have received a copy of the GNU General Public License along with this program; if not, |
|---|
| 18 | * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 19 | */ |
|---|
| 20 | |
|---|
| 21 | #import "SapphireLayerController.h" |
|---|
| 22 | #import "SapphireFrontRowCompat.h" |
|---|
| 23 | |
|---|
| 24 | @implementation SapphireLayerController |
|---|
| 25 | |
|---|
| 26 | - (id)initWithScene:(BRRenderScene *)scene |
|---|
| 27 | { |
|---|
| 28 | if([[BRPostedAlertController class] instancesRespondToSelector:@selector(initWithScene:)]) |
|---|
| 29 | self = [super initWithScene:scene]; |
|---|
| 30 | else |
|---|
| 31 | self = [super init]; |
|---|
| 32 | |
|---|
| 33 | [self setControls:[NSArray array]]; |
|---|
| 34 | |
|---|
| 35 | return self; |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | - (BRRenderScene *)scene |
|---|
| 39 | { |
|---|
| 40 | if([[BRPostedAlertController class] instancesRespondToSelector:@selector(scene)]) |
|---|
| 41 | return [super scene]; |
|---|
| 42 | |
|---|
| 43 | if(NSClassFromString(@"BRRenderScene") != nil) |
|---|
| 44 | return [BRRenderScene sharedInstance]; |
|---|
| 45 | return nil; |
|---|
| 46 | } |
|---|
| 47 | |
|---|
| 48 | @end |
|---|