[SOLVED] Cocos 3.13 strange behavior setDesignResolutionSize()

Hello,
just start New project with 3.13, before i used 3.10 in AppDelegate

if(!glview) {
glview = GLViewImpl::createWithRect(“Example”, Rect(0, 0, 960, 640));
director->setOpenGLView(glview);

}

director->getOpenGLView()->setDesignResolutionSize(960, 640, ResolutionPolicy::SHOW_ALL);

and work fine on all devices.

Now in 3.13 i have this result on iphone 4s with ios 7.

change ResolutionPolicy to NO_BORDER or EXACT_FIT not solve the problem, as if my screen is 640x640. If i check with getVisibleSize() rosolution is 960x640.

Hello @dirtyshadows !

Did you use the latest version from githab?

They have fixed something recently in connection with this topic.

1 Like

Yes, i use latest version from github.

Ok! my glview and DesignResolutionSize is 960x640, ResolutionPolicy EXACT_FIT if i compile app with Portrait and Landscape otions i have this:

Landscape:

Portrait:

I used the 3.13.1 branch and everything is fine for me. And I used android.
Try to download this version.

Also, could you show your AppDelegate.cpp ?

OK!
with version 3.10, 3.11.1 all is fine, but with 3.12, 3.13.1 have this result.
My appdelegate:

I don’t know, maybe IOS 7 is problem?

I think the default values is the problem.

Try to add
director->setContentScaleFactor(1.0)

below director->getOpenGLView()->setDesignResolutionSize(960, 640, ResolutionPolicy::EXACT_FIT).

Thanks
for help but and setContentScaleFactor() don’t solve the problem, only scale images not resolution, as i have resolution 640x960 in landscape mode, maybe bug, maybe unsupported IOS - 7.0.4

It was just a theory because I saw a distortion of proportions on your screenshots. I know that setContentScaleFactor() should not affect the proportion, but there might just be some logical error in the new version.

I am sorry I am not iOS developer. But it seems abnormal.

@ricardo Could you look at this?

well, we recently fixed a bug regarding that.
it could be related to this issue: https://github.com/cocos2d/cocos2d-x/issues/16485 (which will be fixed in v3.13.1)

if it is triggered in v3.12, then it is another bug… perhaps related to VR… not sure.
Could some create a ticket in the issue tracker? Thanks.

Thanks,
man
but this issue not solve the problem I create new issue with problem
https://github.com/cocos2d/cocos2d-x/issues/16565

After several attempts (thanks ricardo), the problem is clarified - IOS 7.
I don’t know how about IOS 7.1 but on IOS 8 all work fine.
Cocos team pls change right Runtime Requirements on github page.