mirror of
https://github.com/yawut/SDL.git
synced 2026-09-11 10:36:27 -05:00
We can update the OpenGL layer binding when we're laying out the views
This commit is contained in:
@@ -121,7 +121,8 @@
|
||||
}
|
||||
/* end create buffers */
|
||||
|
||||
self.autoresizingMask = 0; // don't allow autoresize, since we need to do some magic in -(void)updateFrame.
|
||||
self.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
|
||||
self.autoresizesSubviews = YES;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -198,6 +199,7 @@
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[EAGLContext setCurrentContext:context];
|
||||
[self updateFrame];
|
||||
}
|
||||
|
||||
- (void)destroyFramebuffer
|
||||
|
||||
@@ -145,7 +145,6 @@
|
||||
|
||||
[uiwindow setFrame:frame];
|
||||
[data->view setFrame:frame];
|
||||
[data->view updateFrame];
|
||||
SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user