Make SDL_uikitviewcontroller.window a real Objective-C property and synthesize
authorKees Bakker <kees@ijzerbout.nl>
Wed, 28 Sep 2011 21:42:02 +0200
changeset 601183a21d3bd5c1
parent 6010 508aa078acc0
child 6012 0291eb4caec4
Make SDL_uikitviewcontroller.window a real Objective-C property and synthesize
src/video/uikit/SDL_uikitviewcontroller.h
src/video/uikit/SDL_uikitviewcontroller.m
     1.1 --- a/src/video/uikit/SDL_uikitviewcontroller.h	Wed Sep 28 21:25:46 2011 +0200
     1.2 +++ b/src/video/uikit/SDL_uikitviewcontroller.h	Wed Sep 28 21:42:02 2011 +0200
     1.3 @@ -27,8 +27,12 @@
     1.4  @private
     1.5      SDL_Window *window;
     1.6  }
     1.7 +
     1.8 +@property (readwrite) SDL_Window *window;
     1.9 +
    1.10  - (id)initWithSDLWindow:(SDL_Window *)_window;
    1.11  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient;
    1.12  - (void)loadView;
    1.13  - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation;
    1.14 +
    1.15  @end
     2.1 --- a/src/video/uikit/SDL_uikitviewcontroller.m	Wed Sep 28 21:25:46 2011 +0200
     2.2 +++ b/src/video/uikit/SDL_uikitviewcontroller.m	Wed Sep 28 21:42:02 2011 +0200
     2.3 @@ -33,12 +33,15 @@
     2.4  
     2.5  @implementation SDL_uikitviewcontroller
     2.6  
     2.7 +@synthesize window;
     2.8 +
     2.9  - (id)initWithSDLWindow:(SDL_Window *)_window
    2.10  {
    2.11 -    if ((self = [self init]) == nil) {
    2.12 +    self = [self init];
    2.13 +    if (self == nil) {
    2.14          return nil;
    2.15      }
    2.16 -    self->window = _window;
    2.17 +    self.window = _window;
    2.18      return self;
    2.19  }
    2.20