Skip to content

Commit 084b7c2

Browse files
authored
Fixed bug size does not change when the screen is rotated. (cocos2d#20662)
1 parent 247bb14 commit 084b7c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cocos/platform/ios/CCEAGLView-ios.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
7070
#import "base/CCIMEDispatcher.h"
7171
#import "renderer/backend/metal/DeviceMTL.h"
7272
#import "platform/ios/CCInputView-ios.h"
73+
#include "renderer/backend/metal/Utils.h"
7374

7475
//CLASS IMPLEMENTATIONS:
7576

@@ -195,6 +196,8 @@ - (void) layoutSubviews
195196
size_.width *= self.contentScaleFactor;
196197
size_.height *= self.contentScaleFactor;
197198

199+
cocos2d::backend::Utils::resizeDefaultAttachmentTexture(size_.width, size_.height);
200+
198201
// Avoid flicker. Issue #350
199202
if ([NSThread isMainThread])
200203
{

0 commit comments

Comments
 (0)