cocos2d/cocos2d-x — pull request #1289 by moadib (2012-09-06 09:14:30+00:00)
Title: Addition to new Multi-resolution adaption scheme

I've added ability to use ```setContentScaleFactor()``` in pair with ```setDesignResolutionSize()``` on all platforms.

Example from real life, we have "iphone" and "iphonehd" resource folders and want make our android game with this resources.

We won't make additional assets which adopted for 720x480 resolution. But just scale all with ```
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(480, 320, kResolutionShowAll);
``` isn't as good as it can be. It is still use "iphone" resources

What i suggest?

```cpp
if (pDirector->getWinSize().height > 320)
{
CCFileUtils::sharedFileUtils()->setResourceDirectory("hd");
pDirector->setContentScaleFactor(2.0f); // attention! must be called before setDesignResolutionSize
}
else
CCFileUtils::sharedFileUtils()->setResourceDirectory("normal");

CCEGLView::sharedOpenGLView()->setDesignResolutionSize(480, 320, kResolutionShowAll);
```

How it works?
It is also scaled to 720x480, but uses resources for retina. I think that everyone understand that downscaled texture looks better than upscaled :)
And it is work without any changes in game code.

Of course you still can use all as designed by developers.