mirror of https://github.com/axmolengine/axmol.git
closed #4607: Fixed project created by template crashes on iOS5.1 device.
This commit is contained in:
parent
31fdca1045
commit
cb807e61c2
|
@ -70,14 +70,20 @@
|
|||
}
|
||||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
|
||||
cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView();
|
||||
cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView();
|
||||
|
||||
if (glview)
|
||||
{
|
||||
CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView();
|
||||
|
||||
CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);
|
||||
|
||||
cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height);
|
||||
if (eaglview)
|
||||
{
|
||||
CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);
|
||||
cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//fix not hide status on ios7
|
||||
|
|
Loading…
Reference in New Issue