The game is not rescaled

Hi all,

I have changed my last game to “cocos2d-2.0-x-2.0.4” to support various resolutions, but the game is not scaled to the correct screen, I mean:

My code is:

static Resource smallResource = { cocos2d::CCSizeMake(320, 480), “iphone” };
static Resource mediumResource = { cocos2d::CCSizeMake(640, 960), “iphonehd” };
static Resource largeResource = { cocos2d::CCSizeMake(720, 1080), “hd” };
static cocos2d::CCSize designResolutionSize = cocos2d::CCSizeMake(720, 1080);

pEGLView->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, kResolutionShowAll);

if (frameSize.width <= smallResource.size.width) {
CCFileUtils::sharedFileUtils()>setResourceDirectory;
pDirector
>setContentScaleFactor(smallResource.size.width/designResolutionSize.width);
} else if (frameSize.width <= mediumResource.size.width) {
CCFileUtils::sharedFileUtils()>setResourceDirectory;
pDirector
>setContentScaleFactor(mediumResource.size.width/designResolutionSize.width);
} else {
CCFileUtils::sharedFileUtils()>setResourceDirectory;
pDirector
>setContentScaleFactor(largeResource.size.width/designResolutionSize.width);
}

And the device is 480x854 so the chosen resolution will be mediumResource but when the game is launched, the screen only shows a zone of the game screen, I mean, the resolution 640x960 is not rescaled to 480x854… Does anyone know how to solve it?

Thank you!

No one has this problem? :frowning: