Dynamically change resolution policy in cocos2d-x

Dynamically change resolution policy in cocos2d-x
0.0 0


Hello everyone,

I have used kResolutionExactFit policy in my game, and it is giving quite good result too. But in some case the images are not scaled properly. Like circle shape images are scaled to oval shape. I have set designResolution to 960*640. I have this problem in Canvas hd , which has 1280*720 resolution. In Canvas hd other images are not creating any issue. but this circle shape images are creating issue.

I have tried to change the policy dynamically. But i am not getting any result. How can i solve this issue? Is there any way to change resolution policy? Or how can i change this issue??

Can any one guide me through this issue?


I’m very sure kResolutionExactFit will scale all images to fit a different ratio screen. The recommended way is to use kResolutionNoBorder and determine where to place each image after getting the visible origin and visible size.