mirror of https://github.com/axmolengine/axmol.git
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:
commit
086464f07a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue