Make SDL_uikitviewcontroller.window a real Objective-C property and synthesize

This commit is contained in:
Kees Bakker 2011-09-28 21:42:02 +02:00
parent f1c04b8c14
commit c33ade3bc3
2 changed files with 9 additions and 2 deletions

View file

@ -27,8 +27,12 @@
@private
SDL_Window *window;
}
@property (readwrite) SDL_Window *window;
- (id)initWithSDLWindow:(SDL_Window *)_window;
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient;
- (void)loadView;
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation;
@end

View file

@ -33,12 +33,15 @@
@implementation SDL_uikitviewcontroller
@synthesize window;
- (id)initWithSDLWindow:(SDL_Window *)_window
{
if ((self = [self init]) == nil) {
self = [self init];
if (self == nil) {
return nil;
}
self->window = _window;
self.window = _window;
return self;
}