mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6324 from kicktheken/develop
Fix lua project template crash on iOS5.1 device
This commit is contained in:
commit
65ffb5bb65
|
@ -73,11 +73,17 @@
|
|||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
|
||||
cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView();
|
||||
|
||||
CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);
|
||||
if (glview)
|
||||
{
|
||||
CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView();
|
||||
|
||||
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
|
||||
|
|
|
@ -73,11 +73,17 @@
|
|||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
|
||||
cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView();
|
||||
|
||||
CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);
|
||||
if (glview)
|
||||
{
|
||||
CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView();
|
||||
|
||||
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