Merge pull request #6081 from samuele3hu/develop_socket

fix the lua template error that would lead to crash when do rotate
This commit is contained in:
minggo 2014-04-01 11:20:26 +08:00
commit 086464f07a
2 changed files with 11 additions and 5 deletions

View File

@ -72,9 +72,12 @@
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
CGSize s = CGSizeMake([[CCEAGLView sharedEGLView] getWidth], [[CCEAGLView sharedEGLView] getHeight]);
cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView();
CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView();
cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height);
CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);
cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height);
}
//fix not hide status on ios7

View File

@ -70,11 +70,14 @@
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
CGSize s = CGSizeMake([[CCEAGLView sharedEGLView] getWidth], [[CCEAGLView sharedEGLView] getHeight]);
cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView();
CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView();
cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height);
CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);
cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height);
}
//fix not hide status on ios7