Make SDL_uikitviewcontroller.window a real Objective-C property and synthesize
This commit is contained in:
parent
f1c04b8c14
commit
c33ade3bc3
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue